File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- FROM golang:1-bookworm as builder
1+ FROM --platform=$BUILDPLATFORM golang:1-bookworm as builder
22
33# Install GoReleaser
4- RUN wget --no-verbose https://github.com/goreleaser/goreleaser/releases/download/v1.26.2/goreleaser_1.26.2_amd64.deb
5- RUN dpkg -i goreleaser_1.26.2_amd64.deb
4+ ARG BUILDARCH TARGETOS TARGETARCH
5+ RUN wget --no-verbose "https://github.com/goreleaser/goreleaser/releases/download/v1.26.2/goreleaser_1.26.2_$BUILDARCH.deb"
6+ RUN dpkg -i "goreleaser_1.26.2_$BUILDARCH.deb"
67
78# Create and change to the app directory.
89WORKDIR /app
@@ -19,7 +20,7 @@ COPY . ./
1920# RUN git lfs pull && ls -alh publications
2021
2122# Run goreleaser
22- RUN goreleaser build --single-target --id rwp --skip=validate --snapshot
23+ RUN GOOS=$TARGETOS GOARCH=$TARGETARCH goreleaser build --single-target --id rwp --skip=validate --snapshot --output ./rwp
2324
2425# Run tests
2526# FROM builder AS tester
@@ -40,7 +41,7 @@ ADD https://readium-playground-files.storage.googleapis.com/demo/moby-dick.epub
4041ADD https://readium-playground-files.storage.googleapis.com/demo/BellaOriginal3.epub /srv/publications/
4142
4243# Copy built Go binary
43- COPY --from=builder /app/dist/rwp_linux_amd64_v3/ rwp /opt/
44+ COPY --from=builder " /app/rwp" /opt/
4445
4546EXPOSE 15080
4647
You can’t perform that action at this time.
0 commit comments