deployed at fix
This commit is contained in:
parent
2a98013a96
commit
f3ca970174
1 changed files with 8 additions and 5 deletions
13
Dockerfile
13
Dockerfile
|
|
@ -53,16 +53,19 @@ RUN apt-get update -y && \
|
||||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
||||||
ENV LANG="en_US.UTF-8" LANGUAGE="en_US:en" LC_ALL="en_US.UTF-8"
|
ENV LANG="en_US.UTF-8" LANGUAGE="en_US:en" LC_ALL="en_US.UTF-8"
|
||||||
|
|
||||||
# Set deployment timestamp to current time during build
|
# Set working directory and create it
|
||||||
RUN date -u +"%Y-%m-%dT%H:%M:%SZ" > /app/deployed_at.txt
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR "/app"
|
WORKDIR "/app"
|
||||||
RUN chown nobody /app
|
RUN mkdir -p /app
|
||||||
|
|
||||||
|
# Set deployment timestamp to current time during runtime container build
|
||||||
|
RUN date -u +"%Y-%m-%dT%H:%M:%SZ" > /app/deployed_at.txt
|
||||||
|
|
||||||
# Copy release from builder
|
# Copy release from builder
|
||||||
COPY --from=builder --chown=nobody:root /app/release ./
|
COPY --from=builder --chown=nobody:root /app/release ./
|
||||||
|
|
||||||
|
# Set ownership for the entire app directory
|
||||||
|
RUN chown -R nobody:root /app
|
||||||
|
|
||||||
# Set user and command
|
# Set user and command
|
||||||
USER nobody
|
USER nobody
|
||||||
CMD ["/app/bin/server"]
|
CMD ["/app/bin/server"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue