Skip to content

Commit

Permalink
correct dockerfile to use arm64 and main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dreth committed Oct 9, 2024
1 parent a27feb3 commit c6e47e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ You can optionally disable the frontend in case you want only to directly intera

### Docker

The application is containerized using docker, we use sqlite as the database by default, but intend to support postgres in the future.
The application is containerized using docker, we use sqlite as the database by default.

**Note the architecture you're building for in the dockerfiles.**

#### Docker compose

Expand Down
4 changes: 2 additions & 2 deletions prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build the Go API server
FROM --platform=linux/amd64 golang:1.22.4-alpine AS go-builder
FROM --platform=linux/arm64 golang:1.22.4-alpine AS go-builder

# add gcc
RUN apk add --no-cache gcc libc-dev sqlite-dev musl-dev
Expand All @@ -15,7 +15,7 @@ RUN go mod download
COPY backend/ ./

# Set necessary environment variables needed for our image and build the API server.
ENV CGO_ENABLED=1 GOOS=linux GOARCH=amd64
ENV CGO_ENABLED=1 GOOS=linux GOARCH=arm64
RUN go build -tags musl --ldflags "-extldflags -static -s -w" -o main .

# Stage 2: Build the Next.js app
Expand Down

0 comments on commit c6e47e4

Please sign in to comment.