Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/pipeline #992

Merged
merged 1 commit into from
Sep 9, 2024
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
4 changes: 1 addition & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ USER 1001

WORKDIR app-root/backend

RUN if [ -d "../backend/target" ]; then \
cp -r --chown=1001 ../backend/target .; \
fi
COPY --chown=1001 backend/target .

ENTRYPOINT ["/bin/sh", "-c", "export BACKEND_VERSION=$(find . -type f -name 'backend-*.jar' -print -quit | sed -n 's/.*backend-\\(.*\\)\\.jar/\\1/p'); java -jar backend-${BACKEND_VERSION}.jar"]
4 changes: 2 additions & 2 deletions docker/local-prod/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ services:
spring:
container_name: spring
build:
context: ./..
dockerfile: Dockerfile
context: .
dockerfile: local-prod.Dockerfile
restart: always
ports:
- 8080:8080
Expand Down
12 changes: 12 additions & 0 deletions docker/local-prod/local-prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM alpine:3.19

USER root

RUN apk update && apk add --upgrade curl && apk --no-cache add openjdk17

RUN adduser --home /app-root --uid 1001 --disabled-password okr
USER 1001

WORKDIR app-root/backend

ENTRYPOINT ["/bin/sh", "-c", "export BACKEND_VERSION=$(find . -type f -name 'backend-*.jar' -print -quit | sed -n 's/.*backend-\\(.*\\)\\.jar/\\1/p'); java -jar backend-${BACKEND_VERSION}.jar"]
Loading