File tree 2 files changed +11
-7
lines changed
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,18 @@ FROM livingatlases/java-11-base:1.0.0
2
2
3
3
# Lint with:
4
4
# docker run --rm -i hadolint/hadolint < Dockerfile
5
- # Test with:
6
- # container-structure-test test --driver tar --image livingatlases/java-11-base:1.0.0 --config container-test.yaml
7
5
8
6
# Args
9
7
ARG APP_ARTIFACT=collectory
10
8
ARG USER=collectory
11
9
ARG WAR_FILE=./build/libs/collectory-*.war
10
+ ARG DOCKERIZE_ARGS="-wait tcp://living-atlas-collectory-mysql:3306 -timeout 120s"
12
11
13
12
# Env variables
13
+ ENV SERVER_PORT="8080"
14
14
ENV WAR_FILE_ENV=${WAR_FILE}
15
15
ENV JAVA_OPTS="-Djava.awt.headless=true -Xmx256m -Xms256m -XX:+UseConcMarkSweepGC -Dlog4j2.formatMsgNoLookups=true"
16
- ENV MYSQL_HOST="living-atlas-collectory-mysql"
17
- ENV SERVER_PORT="8080"
16
+ ENV DOCKERIZE_OPTS=${DOCKERIZE_ARGS}
18
17
19
18
# Directories and perms
20
19
RUN mkdir -p /data/$APP_ARTIFACT && \
@@ -28,7 +27,5 @@ RUN chown -R $USER:$USER /opt/atlas/$APP_ARTIFACT
28
27
29
28
USER $USER
30
29
EXPOSE $SERVER_PORT
31
- # Lint with:
32
- # docker run --rm -i hadolint/hadolint < Dockerfile
33
30
# hadolint ignore=DL3025
34
- ENTRYPOINT dockerize -wait tcp://$MYSQL_HOST:3306 -timeout 120s sh -c "java $JAVA_OPTS -jar app.war"
31
+ ENTRYPOINT dockerize $DOCKERIZE_OPTS sh -c "java $JAVA_OPTS -jar app.war"
Original file line number Diff line number Diff line change
1
+ # Run with: container-structure-test test --driver tar --image livingatlases/collectory:latest --config src/main/docker/container-test.yaml
2
+ schemaVersion : 2.0.0
3
+ fileExistenceTests :
4
+ - name : ' war'
5
+ path : ' /opt/atlas/collectory/app.war'
6
+ shouldExist : true
7
+ permissions : ' -rw-rw-r--'
You can’t perform that action at this time.
0 commit comments