Skip to content

Commit

Permalink
refactor: Applied docker build practices (#5375)
Browse files Browse the repository at this point in the history
* chore: fixed stage name casing

Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>

* chore: fixed legacy key value format

Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>

* chore: fixed format

Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>

* chore: explicitly specify the shell

Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>

* chore: ignore SecretsUsedInArgOrEnv

Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>

* chore: remove empty continuation lines

Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>

* feat: skip load serviceDef on ECS standalone task (#5373)

Signed-off-by: Cuong Vu <johnvu23.vn@gmail.com>
Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>

---------

Signed-off-by: ponkio-o <29038315+ponkio-o@users.noreply.github.com>
Signed-off-by: Cuong Vu <johnvu23.vn@gmail.com>
Co-authored-by: Cuong Vu <77630688+cuongvd23@users.noreply.github.com>
  • Loading branch information
ponkio-o and cuongvd23 authored Dec 2, 2024
1 parent c33e98c commit 52a930a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tool/actions-plan-preview/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.4-alpine3.20 as builder
FROM golang:1.22.4-alpine3.20 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
Expand All @@ -7,6 +7,6 @@ RUN go build -o /plan-preview .

FROM ghcr.io/pipe-cd/pipectl:v0.43.1
COPY --from=builder /plan-preview /
ENV PATH $PATH:/app/cmd/pipectl
ENV PATH=$PATH:/app/cmd/pipectl
RUN chmod +x /plan-preview
ENTRYPOINT ["/plan-preview"]
6 changes: 3 additions & 3 deletions tool/codegen/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Builder image to build go program.
FROM golang:1.23 as BUILDER
FROM golang:1.23 AS builder

COPY protoc-gen-auth /protoc-gen-auth
RUN cd /protoc-gen-auth \
Expand Down Expand Up @@ -50,10 +50,10 @@ RUN for target in x86_64 aarch_64; do \
&& chmod +x bin/protoc-gen-js \
&& rm -rf protobuf-javascript-${PROTOC_GEN_JS_VER}-linux-${target}.tar.gz; \
done && \
mv /protoc-gen-js-aarch_64/ /protoc-gen-js-aarch64/
mv /protoc-gen-js-aarch_64/ /protoc-gen-js-aarch64/

# protoc-gen-auth
COPY --from=BUILDER /usr/local/bin/protoc-gen-auth /usr/local/bin/
COPY --from=builder /usr/local/bin/protoc-gen-auth /usr/local/bin/

# gomock
RUN go install github.com/golang/mock/mockgen@v${GOMOCK_VER}
Expand Down
5 changes: 3 additions & 2 deletions tool/firestore-emulator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ FROM google/cloud-sdk:$GOOGLE_CLOUD_SDK_VERSION

RUN apk add --update --no-cache openjdk11-jre-headless

ENV FIRESTORE_PROJECT_ID "pipecd-test"
ENV FIRESTORE_PROJECT_ID="pipecd-test"
RUN gcloud config set project $FIRESTORE_PROJECT_ID && gcloud components install cloud-firestore-emulator beta --quiet

ENV PORT 8080
ENV PORT=8080
EXPOSE "$PORT"

SHELL ["/bin/sh", "-c"]
ENTRYPOINT gcloud beta emulators firestore start --host-port="0.0.0.0:${PORT}"
3 changes: 1 addition & 2 deletions tool/piped-base-okd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# check=skip=SecretsUsedInArgOrEnv
# https://github.com/pipe-cd/pipecd/pkgs/container/piped-base/103341355?tag=v0.44.0-alpha-52-ge881cac
FROM ghcr.io/pipe-cd/piped-base@sha256:18a5a6af6507c8c70c5442d19651a2000672c78fc5dd91cfd3c0af26c899c1d3

Expand All @@ -18,12 +19,10 @@ RUN \
make \
jq \
cmake && \

# Install glibc to be used for building nss_wrapper.
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.33-r0/glibc-2.33-r0.apk && \
apk add glibc-2.33-r0.apk && \

# Install nss_wrapper to add an random UID to "passwd" at runtime without having to directly modify /etc/passwd.
/installer/install-nss-wrapper.sh && \
# Remove what were used for installation.
Expand Down

0 comments on commit 52a930a

Please sign in to comment.