Fix permission error in Dockerfile
- Create deployed_at.txt before switching to elixir user - Set proper ownership on the file - This fixes the 'Permission denied' error during build Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
160c4fdc0e
commit
ddd405940e
1 changed files with 6 additions and 3 deletions
|
|
@ -57,9 +57,12 @@ RUN apt-get update -y && \
|
|||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Create deployment timestamp before switching users
|
||||
RUN date -u +"%Y-%m-%dT%H:%M:%SZ" > /app/deployed_at.txt && \
|
||||
chown elixir:root /app/deployed_at.txt
|
||||
|
||||
COPY --from=builder --chown=elixir:root /app/_build/prod/rel/aprsme ./
|
||||
|
||||
USER elixir
|
||||
|
||||
RUN date -u +"%Y-%m-%dT%H:%M:%SZ" > /app/deployed_at.txt
|
||||
|
||||
CMD ["/app/bin/server"]
|
||||
Loading…
Add table
Reference in a new issue