Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ponkio-o committed Dec 14, 2024
1 parent b92ca45 commit 37ca665
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 16 deletions.
13 changes: 12 additions & 1 deletion cmd/helloworld/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
FROM golang:1.23.3 AS builder

WORKDIR /app

COPY go.* ./
RUN go mod download

COPY . ./

RUN make build/go MOD=helloworld

FROM alpine:3.20

ADD .artifacts/helloworld /usr/local/bin/helloworld
COPY --from=builder /app/.artifacts/helloworld /usr/local/bin/helloworld

ENTRYPOINT ["helloworld"]
17 changes: 14 additions & 3 deletions cmd/launcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base/301720292?tag=v0.49.3
FROM ghcr.io/pipe-cd/piped-base@sha256:e5ce81bfd81b6d8d24b2caf9ec482c3f6d11fff7ab96f6cc6fc854e82376fb3d
FROM golang:1.23.3 AS builder

ADD .artifacts/launcher /usr/local/bin/launcher
WORKDIR /app

COPY go.* ./
RUN go mod download

COPY . ./

RUN make build/go MOD=launcher

# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base/321463679?tag=v0.50.0-26-ga8527d2
FROM ghcr.io/pipe-cd/piped-base@sha256:9960b45a5aa822ae45ca2966056d8d2e98795b51681df25afd1fecf96360981c

COPY --from=builder /app/.artifacts/launcher /usr/local/bin/launcher

ENTRYPOINT ["launcher"]
17 changes: 14 additions & 3 deletions cmd/launcher/Dockerfile-okd
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base-okd/237191933?tag=v0.47.3-rc0-21-ge20cd0b
FROM ghcr.io/pipe-cd/piped-base-okd@sha256:afb1bfee70d445986d04c2066d2887da7b1e2e454cecabec5bf37e3201cd7e7e
FROM golang:1.23.3 AS builder

ADD .artifacts/launcher /usr/local/bin/launcher
WORKDIR /app

COPY go.* ./
RUN go mod download

COPY . ./

RUN make build/go MOD=launcher

# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base-okd/321464518?tag=v0.50.0-26-ga8527d2
FROM ghcr.io/pipe-cd/piped-base-okd@sha256:da9bd5a1dae3aa5c2df4baba81ff836ba4a55159d85984605549ef2d1f136895

COPY --from=builder /app/.artifacts/launcher /usr/local/bin/launcher

ENTRYPOINT ["launcher"]
27 changes: 25 additions & 2 deletions cmd/pipecd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# web builder
FROM node:20.18.1-alpine3.20 AS web

WORKDIR /app

COPY . .

RUN apk add --no-cache make
RUN make update/web-deps
RUN make build/web

# pipecd builder
FROM golang:1.23.3 AS builder

WORKDIR /app

COPY go.* ./
RUN go mod download

COPY . ./

RUN make build/go MOD=pipecd

FROM alpine:3.20

ARG GOOGLE_CLOUD_SDK_VERSION=477.0.0
Expand All @@ -15,7 +38,7 @@ ENV PATH="/google-cloud-sdk/bin:${PATH}"

RUN mkdir -p web/static

ADD .artifacts/pipecd /usr/local/bin/pipecd
ADD .artifacts/web-static web/static
COPY --from=builder /app/.artifacts/pipecd /usr/local/bin/pipecd
COPY --from=web /app/.artifacts/web-static web/static

ENTRYPOINT ["pipecd"]
13 changes: 12 additions & 1 deletion cmd/pipectl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
FROM golang:1.23.3 AS builder

WORKDIR /app

COPY go.* ./
RUN go mod download

COPY . ./

RUN make build/go MOD=pipectl

FROM alpine:3.20

RUN apk add --no-cache git

ADD .artifacts/pipectl /usr/local/bin/pipectl
COPY --from=builder /app/.artifacts/pipectl /usr/local/bin/pipectl

ENTRYPOINT ["pipectl"]
17 changes: 14 additions & 3 deletions cmd/piped/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base/301720292?tag=v0.49.3
FROM ghcr.io/pipe-cd/piped-base@sha256:e5ce81bfd81b6d8d24b2caf9ec482c3f6d11fff7ab96f6cc6fc854e82376fb3d
FROM golang:1.23.3 AS builder

ADD .artifacts/piped /usr/local/bin/piped
WORKDIR /app

COPY go.* ./
RUN go mod download

COPY . ./

RUN make build/go MOD=piped

# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base/321463679?tag=v0.50.0-26-ga8527d2
FROM ghcr.io/pipe-cd/piped-base@sha256:9960b45a5aa822ae45ca2966056d8d2e98795b51681df25afd1fecf96360981c

COPY --from=builder /app/.artifacts/piped /usr/local/bin/piped

ENTRYPOINT ["piped"]
17 changes: 14 additions & 3 deletions cmd/piped/Dockerfile-okd
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base-okd/237191933?tag=v0.47.3-rc0-21-ge20cd0b
FROM ghcr.io/pipe-cd/piped-base-okd@sha256:afb1bfee70d445986d04c2066d2887da7b1e2e454cecabec5bf37e3201cd7e7e
FROM golang:1.23.3 AS builder

ADD .artifacts/piped /usr/local/bin/piped
WORKDIR /app

COPY go.* ./
RUN go mod download

COPY . ./

RUN make build/go MOD=piped

# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base-okd/321464518?tag=v0.50.0-26-ga8527d2
FROM ghcr.io/pipe-cd/piped-base-okd@sha256:da9bd5a1dae3aa5c2df4baba81ff836ba4a55159d85984605549ef2d1f136895

COPY --from=builder /app/.artifacts/piped /usr/local/bin/piped

ENTRYPOINT ["piped"]

0 comments on commit 37ca665

Please sign in to comment.