Mnushkin, Dmitry | 6514e3b | 2019-10-21 09:25:56 -0400 | [diff] [blame^] | 1 | FROM docker.io/openjdk:8-jdk-alpine |
| 2 | |
| 3 | #Create User so |
| 4 | RUN addgroup -g 1000 so && adduser -S -u 1000 -G so so |
| 5 | |
| 6 | ARG project_version=1.1.0-SNAPSHOT |
| 7 | ARG artifact_id |
| 8 | ARG docker_repository |
| 9 | ENV docker_repository $docker_repository |
| 10 | ENV project_version $project_version |
| 11 | ENV artifact_id $artifact_id |
| 12 | |
| 13 | ENV no_proxy localhost |
| 14 | |
| 15 | VOLUME /tmp |
| 16 | WORKDIR /app |
| 17 | |
| 18 | ADD /maven/${artifact_id}-${project_version}.jar /app/app.jar |
| 19 | RUN chown -R so:so /app |
| 20 | |
| 21 | USER so |
| 22 | |
| 23 | |
| 24 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app/app.jar"] |