@@ -72,20 +72,27 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
7272FROM ${deployment_base_image}:${deployment_base_image_tag}
7373
7474# Set shell with pipefail option for better error handling
75- SHELL ["/bin/bash " , "-o" , "pipefail" , "-c" ]
75+ SHELL ["/bin/sh " , "-o" , "pipefail" , "-c" ]
7676
7777# Install Node.js and cdk8s-cli directly
7878# hadolint ignore=DL3015
79- RUN apt-get update && \
80- apt-get install -y --no-install-recommends ca-certificates=20240203~22.04.1 curl=7.81.0-1ubuntu1.20 && \
81- curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
82- apt-get install -y nodejs=18.19.1-1nodesource1 && \
83- npm install -g
[email protected] && \
84- curl -fsSL -o go1.24.4.linux-amd64.tar.gz https://go.dev/dl/go1.24.4.linux-amd64.tar.gz && \
85- tar -C /usr/local -xzf go1.24.4.linux-amd64.tar.gz && \
86- rm go1.24.4.linux-amd64.tar.gz && \
87- apt-get clean && \
88- rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
79+ # RUN apt-get update && \
80+ # apt-get install -y --no-install-recommends ca-certificates=20240203~22.04.1 curl=7.81.0-1ubuntu1.20 && \
81+ # curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
82+ # apt-get install -y nodejs=18.19.1-1nodesource1 && \
83+ # npm install -g [email protected] && \84+ # curl -fsSL -o go1.24.4.linux-amd64.tar.gz https://go.dev/dl/go1.24.4.linux-amd64.tar.gz && \
85+ # tar -C /usr/local -xzf go1.24.4.linux-amd64.tar.gz && \
86+ # rm go1.24.4.linux-amd64.tar.gz && \
87+ # apt-get clean && \
88+ # rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
89+
90+ RUN apk add --no-cache ca-certificates curl nodejs npm \
91+ && npm install -g
[email protected] \
92+ && curl -fsSL -o go1.24.4.linux-amd64.tar.gz https://go.dev/dl/go1.24.4.linux-amd64.tar.gz \
93+ && tar -C /usr/local -xzf go1.24.4.linux-amd64.tar.gz \
94+ && rm go1.24.4.linux-amd64.tar.gz \
95+ && rm -rf /tmp/*
8996
9097# Set Go environment variables
9198ENV PATH=$PATH:/usr/local/go/bin
@@ -95,7 +102,7 @@ WORKDIR /
95102COPY --from=builder /workspace/manager .
96103
97104# Create non-root user
98- RUN useradd --uid 65532 --create- home --shell /bin/bash nonroot
105+ RUN adduser -u 65532 -D -h / home/nonroot -s /bin/sh nonroot
99106
100107# Switch back to non-root user (this line should already exist)
101108# USER root # This was part of the removed direct install, ensure it's not re-added here unless needed for COPY permissions
0 commit comments