Skip to content

Commit 46c7355

Browse files
authored
Updated Dockerfile to try to fix vuln bug (#9974)
* Updated Dockerfile to try to fix vuln bug * Addressed the gemini-code-assist comments * Fixed the dockerfile so it runs using docker build -f deploy/webhook-v2/Dockerfile .
1 parent b3f4a30 commit 46c7355

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

deploy/webhook-v2/Dockerfile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
# limitations under the License.
1414

1515
# Download Docsy theme for Hugo
16-
FROM alpine:3.10 as download-docsy
16+
FROM alpine:3.10 AS download-docsy
1717
# v0.3.0
18-
ENV DOCSY_VERSION 9f55cf34808d720bcfff9398c9f9bb7fd8fce4ec
19-
ENV DOCSY_URL https://github.com/google/docsy.git
18+
ENV DOCSY_VERSION=9f55cf34808d720bcfff9398c9f9bb7fd8fce4ec
19+
ENV DOCSY_URL=https://github.com/google/docsy.git
2020
RUN apk add --no-cache git
2121
WORKDIR /docsy
2222
RUN git clone "${DOCSY_URL}" . && \
@@ -25,33 +25,33 @@ RUN git clone "${DOCSY_URL}" . && \
2525
rm -rf .git
2626

2727
# Download Hugo
28-
FROM alpine:3.10 as download-hugo
29-
ENV HUGO_VERSION 0.99.1
30-
ENV HUGO_URL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
28+
FROM alpine:3.10 AS download-hugo
29+
ENV HUGO_VERSION=0.155.3
30+
ENV HUGO_URL=https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
3131
RUN wget -O- "${HUGO_URL}" | tar xz
3232

3333
# Download kubectl
34-
FROM alpine:3.10 as download-kubectl
35-
ENV KUBECTL_VERSION v1.12.0
36-
ENV KUBECTL_URL https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl
34+
FROM alpine:3.10 AS download-kubectl
35+
ENV KUBECTL_VERSION=v1.35.0
36+
ENV KUBECTL_URL=https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl
3737
RUN wget -O kubectl "${KUBECTL_URL}"
3838
RUN chmod +x kubectl
3939

40-
FROM node:16-stretch as runtime_deps
41-
ENV FIREBASE_TOOLS_VERSION 7.13.1
40+
FROM node:16-stretch AS runtime_deps
41+
ENV FIREBASE_TOOLS_VERSION=7.13.1
4242
RUN npm install -g firebase-tools@${FIREBASE_TOOLS_VERSION} postcss postcss-cli
4343
WORKDIR /app/docs
44-
ENV AUTOPREFIXER_VERSION 9.8.6
44+
ENV AUTOPREFIXER_VERSION=9.8.6
4545
RUN npm install autoprefixer@${AUTOPREFIXER_VERSION}
4646
COPY --from=download-docsy /docsy ./themes/docsy
4747
COPY --from=download-hugo /hugo /usr/local/bin/
4848
COPY --from=download-kubectl /kubectl /usr/local/bin/
4949

50-
FROM golang:1.19 as webhook
50+
FROM golang:1.25 AS webhook
5151
WORKDIR /skaffold
5252
COPY . .
5353
# TODO(aaron-prindle) pass ldflags for -v2
54-
RUN go build -o /webhook -ldflags="-X 'github.com/GoogleContainerTools/skaffold/v2/pkg/webhook/constants.DocsVersion=-v2'" webhook/webhook.go
54+
RUN go build -o /webhook -ldflags="-X 'github.com/GoogleContainerTools/skaffold/v2/pkg/webhook/constants.DocsVersion=-v2'" ./webhook/webhook.go
5555

5656
FROM runtime_deps
5757
COPY --from=webhook /webhook /webhook

0 commit comments

Comments
 (0)