Skip to content

Commit

Permalink
Added Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
LDAP committed Oct 21, 2021
1 parent b4fac38 commit 18e299a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM openjdk:15-jdk-alpine
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} app.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/app.jar"]
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@
# Usage

- Compile the application
- Overwrite the configuration using a custom `application.yml` file
- Overwrite the configuration using a custom `application.yml` file

# Docker
```bash
# Run the following commands to build a docker image
./gradlew build
docker build -t repository/tag .

# Map a custom application.yml into /config and a news folder to /news. For example:
docker run -p 8080:8080 -v path/to/news:/news -v path/to/src/main/resources:/config repository/tag
```

0 comments on commit 18e299a

Please sign in to comment.