Skip to content

Commit

Permalink
upgrade docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp committed Jun 24, 2024
1 parent 55bcc3d commit 85ceae7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/taiko-client--docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Push docker image to GAR"

on:
push:
branches: [main]
branches: [upgrade_taiko-client_docker]
tags:
- "taiko-client-v*"
paths:
Expand Down
15 changes: 8 additions & 7 deletions packages/taiko-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
ARG BUILDPLATFORM=linux/amd64
FROM --platform=${BUILDPLATFORM} golang:1.21-alpine as builder

RUN apk update && apk add --no-cache --update gcc musl-dev linux-headers git make build-base

WORKDIR /build
WORKDIR /taiko-client

COPY go.mod go.sum ./
COPY . .

COPY packages/taiko-client/ packages/taiko-client/

WORKDIR /build/packages/taiko-client
RUN cd /taiko-client && \
go mod init github.com/taikoxyz/taiko-mono && \
go mod tidy

ARG TARGETOS
ARG TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
RUN cd /taiko-client && GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
make build

FROM alpine:latest

RUN apk add --no-cache ca-certificates libstdc++

COPY --from=builder /build/packages/taiko-client/bin/taiko-client /usr/local/bin/
COPY --from=builder /taiko-client/bin/taiko-client /usr/local/bin/

EXPOSE 6060

Expand Down

0 comments on commit 85ceae7

Please sign in to comment.