Skip to content

Commit 12f24b9

Browse files
Joonas HiltunenJontzii
authored andcommitted
Set correct permissions to files
1 parent 6704af0 commit 12f24b9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ RUN apt-get update \
2424
&& rm -rf /var/lib/apt/lists/*
2525

2626
# download script for reading Docker secrets
27-
RUN curl -o /tmp/read-secrets.sh "https://raw.githubusercontent.com/HSLdevcom/jore4-tools/main/docker/read-secrets.sh"
27+
ADD --chmod=755 https://raw.githubusercontent.com/HSLdevcom/jore4-tools/main/docker/read-secrets.sh /tmp/read-secrets.sh
2828

2929
# add helper script for constructing JDBC URL
30-
COPY ./scripts/build-jdbc-urls.sh /tmp/build-jdbc-urls.sh
30+
COPY --chmod=755 ./scripts/build-jdbc-urls.sh /tmp/build-jdbc-urls.sh
3131

3232
# copy compiled jar from builder stage
3333
COPY --from=builder /build/target/*.jar /usr/src/jore4-map-matching/jore4-map-matching.jar
3434

3535
# read Docker secrets into environment variables and run application
36-
CMD /bin/bash -c "source /tmp/read-secrets.sh && source /tmp/build-jdbc-urls.sh && java -jar /usr/src/jore4-map-matching/jore4-map-matching.jar"
36+
CMD ["/bin/bash", "-c", "source /tmp/read-secrets.sh && source /tmp/build-jdbc-urls.sh && java -jar /usr/src/jore4-map-matching/jore4-map-matching.jar"]
3737

3838
HEALTHCHECK --interval=1m --timeout=5s \
3939
CMD curl --fail http://localhost:8080/actuator/health

0 commit comments

Comments
 (0)