Skip to content

Commit

Permalink
feat: add etcdctl to image (#431)
Browse files Browse the repository at this point in the history
Signed-off-by: jyjiangkai <[email protected]>
  • Loading branch information
hwjiangkai authored Feb 13, 2023
1 parent 9cb131f commit 7e1ec6c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
7 changes: 5 additions & 2 deletions build/images/controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ RUN go mod download

ARG TARGETOS
ARG TARGETARCH
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-controller
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-controller && \
wget https://github.com/etcd-io/etcd/releases/download/v3.5.7/etcd-v3.5.7-linux-amd64.tar.gz >/dev/null 2>&1 && \
tar -zxvf etcd-v3.5.7-linux-amd64.tar.gz 1>/dev/null && \
mv etcd-v3.5.7-linux-amd64/etcdctl /workspace/bin/etcdctl

FROM ubuntu:22.10
WORKDIR /vanus
COPY --from=builder /workspace/bin/controller bin/controller
COPY --from=builder /workspace/bin/etcdctl bin/etcdctl
ENTRYPOINT ["bin/controller"]

6 changes: 5 additions & 1 deletion build/images/store/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ RUN go mod download

ARG TARGETOS
ARG TARGETARCH
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-store
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-store && \
wget https://github.com/etcd-io/etcd/releases/download/v3.5.7/etcd-v3.5.7-linux-amd64.tar.gz >/dev/null 2>&1 && \
tar -zxvf etcd-v3.5.7-linux-amd64.tar.gz 1>/dev/null && \
mv etcd-v3.5.7-linux-amd64/etcdctl /workspace/bin/etcdctl

FROM ubuntu:22.10
WORKDIR /vanus
COPY --from=builder /workspace/bin/store bin/store
COPY --from=builder /workspace/bin/etcdctl bin/etcdctl
ENTRYPOINT ["bin/store"]

6 changes: 5 additions & 1 deletion build/images/timer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ RUN go mod download

ARG TARGETOS
ARG TARGETARCH
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-timer
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-timer && \
wget https://github.com/etcd-io/etcd/releases/download/v3.5.7/etcd-v3.5.7-linux-amd64.tar.gz >/dev/null 2>&1 && \
tar -zxvf etcd-v3.5.7-linux-amd64.tar.gz 1>/dev/null && \
mv etcd-v3.5.7-linux-amd64/etcdctl /workspace/bin/etcdctl

FROM ubuntu:22.10
WORKDIR /vanus
COPY --from=builder /workspace/bin/timer bin/timer
COPY --from=builder /workspace/bin/etcdctl bin/etcdctl
ENTRYPOINT ["bin/timer"]

6 changes: 5 additions & 1 deletion build/images/trigger/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ RUN go mod download

ARG TARGETOS
ARG TARGETARCH
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-trigger
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-trigger && \
wget https://github.com/etcd-io/etcd/releases/download/v3.5.7/etcd-v3.5.7-linux-amd64.tar.gz >/dev/null 2>&1 && \
tar -zxvf etcd-v3.5.7-linux-amd64.tar.gz 1>/dev/null && \
mv etcd-v3.5.7-linux-amd64/etcdctl /workspace/bin/etcdctl

FROM ubuntu:22.10
WORKDIR /vanus
COPY --from=builder /workspace/bin/trigger bin/trigger
COPY --from=builder /workspace/bin/etcdctl bin/etcdctl
ENTRYPOINT ["bin/trigger"]

0 comments on commit 7e1ec6c

Please sign in to comment.