Skip to content
Snippets Groups Projects
Commit 9544c216 authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

fix: create folder during build stage

parent 85c67268
1 merge request!87Resolve "TECH - Better local config"
Pipeline #73680 passed
...@@ -38,6 +38,8 @@ RUN CGO_ENABLED=0 go build \ ...@@ -38,6 +38,8 @@ RUN CGO_ENABLED=0 go build \
-ldflags='-w -s -extldflags "-static"' -a \ -ldflags='-w -s -extldflags "-static"' -a \
-o /app/backoffice-server . -o /app/backoffice-server .
RUN mkdir /app/mnt /app/mnt/configs
RUN chown -Rf "${UID}" ./* RUN chown -Rf "${UID}" ./*
# Allow running on ports < 1000 # Allow running on ports < 1000
...@@ -60,10 +62,10 @@ COPY --from=builder /etc/mime.types /etc/mime.types ...@@ -60,10 +62,10 @@ COPY --from=builder /etc/mime.types /etc/mime.types
# Copy static executable and application resources # Copy static executable and application resources
COPY --from=builder /app/backoffice-server /app/backoffice-server COPY --from=builder /app/backoffice-server /app/backoffice-server
COPY --from=builder /app/dev_certificates /app/dev_certificates COPY --from=builder /app/dev_certificates /app/dev_certificates
COPY --from=builder /app/mnt/configs /app/mnt/configs
# Use an unprivileged user. # Use an unprivileged user.
USER appuser:appuser USER appuser:appuser
RUN mkdir /app/mnt /app/mnt/configs
# Run the binary # Run the binary
ENTRYPOINT ["./backoffice-server"] ENTRYPOINT ["./backoffice-server"]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment