Skip to content
Closed
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
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,24 @@
RUN bundle config set system 'true'
RUN bundle install

# COPY --chown=bfs:bfs . .
# =================================
# Target: production
# =================================
FROM base AS production

# Copy the built codebase from the dev stage
COPY --from=development --chown=bfs /usr/local/bundle /usr/local/bundle

# =================================
# Target: production
# =================================
FROM base AS production

Check warning on line 56 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (linux/amd64, ubuntu-24.04)

Stage names should be unique

DuplicateStageName: Duplicate stage name "production", stage names should be unique More info: https://docs.docker.com/go/dockerfile/rule/duplicate-stage-name/

Check warning on line 56 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (linux/arm64, ubuntu-24.04-arm)

Stage names should be unique

DuplicateStageName: Duplicate stage name "production", stage names should be unique More info: https://docs.docker.com/go/dockerfile/rule/duplicate-stage-name/

# Copy the built codebase from the dev stage
# COPY --from=development --chown=bfs /opt/app /opt/app
COPY --from=development --chown=bfs /usr/local/bundle /usr/local/bundle

USER bfs

WORKDIR /opt/app
RUN bundle config set frozen 'true'
RUN bundle install --local
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ services:
- ./:/opt/app:rw
- ./secrets:/run/secrets:ro
secrets:
- source: SSH_KEY
target: /opt/app/.ssh/id_rsa
- source: SSH_KEY
target: /home/bfs/.ssh/id_rsa
uid: "40061"
gid: "40061"
mode: 0400
Expand Down