Skip to content

Commit

Permalink
Default Dockerfile to amd but use arm in compose
Browse files Browse the repository at this point in the history
The compose file is only used to local dev, so we can specify the arm/apple silicon
here.
  • Loading branch information
tbrlpld committed Jul 23, 2023
1 parent 0857790 commit d0df643
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18 as frontend
FROM node:18-bookworm-slim as frontend

WORKDIR /home/node/app

Expand Down Expand Up @@ -32,8 +32,9 @@ ENV PATH=${POETRY_HOME}/bin:$PATH \
RUN env

# Install litestream (https://litestream.io/install/debian/)
RUN wget https://github.com/benbjohnson/litestream/releases/download/v0.3.9/litestream-v0.3.9-linux-amd64.deb
RUN dpkg -i litestream-v0.3.9-linux-amd64.deb
ARG PLATFORM=amd64
RUN wget https://github.com/benbjohnson/litestream/releases/download/v0.3.9/litestream-v0.3.9-linux-$PLATFORM.deb
RUN dpkg -i litestream-v0.3.9-linux-$PLATFORM.deb

# Install poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
Expand Down
8 changes: 2 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ services:
build:
context: .
target: backend-development
# Platforms need to be specified for the build to work on Apple Silicon Macs.
platforms:
- linux/amd64
args:
- PLATFORM=arm64
command: ["tail", "-f", "/dev/null"]
env_file:
- .env
Expand All @@ -20,9 +19,6 @@ services:
build:
context: .
target: frontend
# Platforms need to be specified for the build to work on Apple Silicon Macs.
platforms:
- linux/amd64
command: ["tail", "-f", "/dev/null"]
env_file:
- .env
Expand Down

0 comments on commit d0df643

Please sign in to comment.