Skip to content

Commit f4b0b77

Browse files
fix: cross-platform image building
1 parent 3578003 commit f4b0b77

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@ COPY go.mod go.sum ./
4141
# Install library dependencies
4242
RUN go mod download
4343

44+
ARG TARGETARCH
45+
4446
# Copy the entire project and build it
4547
# This layer is rebuilt when a file changes in the project directory
4648
COPY . .
47-
RUN make
49+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH make
50+
51+
FROM debian:bookworm-slim AS final
4852

49-
FROM debian:bookworm AS final
53+
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
5054

5155
# Create env folder
5256
RUN mkdir /reactivesearch-data && touch /reactivesearch-data/.env && chmod 777 /reactivesearch-data/.env

0 commit comments

Comments
 (0)