Skip to content

Commit

Permalink
Revert "ARMでもAMD64でも使えるDockerfileに"
Browse files Browse the repository at this point in the history
This reverts commit 679e657.
すでにmatrixでarm64指定されていたのでOK
  • Loading branch information
Drumato committed Apr 11, 2024
1 parent 679e657 commit 4f67086
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,11 @@ ARG OYAKI_VERSION
WORKDIR /go/src/oyaki
COPY . /go/src/oyaki

ARG TARGETARCH
ENV LIBWEBP_VERSION=1.3.1
ENV BASE_URL=https://storage.googleapis.com/downloads.webmproject.org/releases/webp
RUN apt-get update && apt-get install -y curl tar
RUN if [ "${TARGETARCH}" = "amd64" ]; then \
ARCH='amd64'; \
elif [ "${TARGETARCH}" = "arm64" ]; then \
ARCH='aarch64'; \
else \
echo "Unsupported arch: ${TARGETARCH}"; exit 1; \
fi && \
curl https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.1-linux-x86-64.tar.gz --output libwebp.tar.gz \
&& tar vzxf libwebp.tar.gz \
&& mv libwebp-1.3.1-linux-x86-64/bin/cwebp /go/bin/

RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -ldflags "-s -w -X main.version=${OYAKI_VERSION}" -o /go/bin/oyaki
RUN CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=${OYAKI_VERSION}" -o /go/bin/oyaki
RUN apt update && apt install -y curl \
&& curl https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.1-linux-x86-64.tar.gz --output libwebp.tar.gz \
&& tar vzxf libwebp.tar.gz \
&& mv libwebp-1.3.1-linux-x86-64/bin/cwebp /go/bin/

FROM gcr.io/distroless/static-debian11

Expand Down

0 comments on commit 4f67086

Please sign in to comment.