Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
FROM openjdk:21
COPY target/sqlite-spring-boot.jar /opt/assets/sqlite-spring-boot.jar
# Use a reliable base image that avoids root permission issues
FROM maven:3.9.5-eclipse-temurin-21 AS builder

# Set working directory
WORKDIR /opt

# Copy project files
COPY pom.xml .
COPY src ./src

# Run build
RUN mvn clean package

# Final image: just the JAR
FROM openjdk:21

COPY --from=builder /opt/target/*.jar /opt/assets/sqlite-spring-boot.jar
WORKDIR /opt/assets

ENV JAVA_OPTS_GC="-server -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC"
ENV JAVA_OPTS="-Xms256m -Xmx256m"
ENV HOSTNAME=client
EXPOSE 50000
EXPOSE 50001
EXPOSE 29000
EXPOSE 10800 11211 47100 47500 49112 8080

EXPOSE 50000 50001 29000 10800 11211 47100 47500 49112 8080

CMD java $JAVA_OPTS_GC $JAVA_OPTS -Dhostname=$HOSTNAME -jar sqlite-spring-boot.jar
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@
## More Details

Μore details along with evaluation experiments can be found in the MSc dissertation (file: StorageFabricForEdgeDevices.pdf).


## Execution updated
1) docker rmi -f edge-sqlite-db:1.0.0
2) docker compose -f docker-kafka-compose.yml up
3) docker build -f Dockerfile . -t edge-sqlite-db:1.0.0
4) docker compose -f docker-compose-node1.yml up

## Kafka Url
http://localhost:9007
Loading