Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Fix docker file #79

Merged
merged 2 commits into from
Jul 23, 2020
Merged
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
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore everything
**

# Allow files and directories
!/target/**
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ VOLUME /tmp
EXPOSE 8080

# The application's jar file
ARG JAR_FILE=target/custom-distribution-service-0.0.1.jar
ARG JAR_FILE=target/*.jar

# Add the application's jar to the container
ADD ${JAR_FILE} custom-distribution-service.jar
ADD ${JAR_FILE} app.jar
sladyn98 marked this conversation as resolved.
Show resolved Hide resolved

# Run the jar file
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/custom-distribution-service.jar"]
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,13 @@ The backend of the project is built on spring-boot and there is a dockerfile pre

## Using Dockerfile

a) Create a package:
```
mvn clean package
```

b) Build Dockerfile:
a) Build Dockerfile:
```
docker build -t cds_backend .
```

c) Run Dockerfile:
b) Run Dockerfile:
```
docker run -p 5000:8080 cds_backend
```
Expand Down
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ COPY . .
EXPOSE 3000

# Finally runs the application
CMD [ "npm", "start" ]
CMD [ "npm", "start" ]