github.com/GoogleContainerTools/skaffold@v1.39.18/deploy/webhook/Dockerfile (about) 1 # Copyright 2019 The Skaffold Authors All rights reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 # Download Docsy theme for Hugo 16 FROM alpine:3.10 as download-docsy 17 ENV DOCSY_VERSION 3c4280bae0db96cb272ddc4b4959b2beef9299af 18 ENV DOCSY_URL https://github.com/google/docsy.git 19 RUN apk add --no-cache git 20 WORKDIR /docsy 21 RUN git clone "${DOCSY_URL}" . && \ 22 git reset --hard "${DOCSY_VERSION}" && \ 23 git submodule update --init --recursive && \ 24 rm -rf .git 25 26 # Download Hugo 27 FROM alpine:3.10 as download-hugo 28 ENV HUGO_VERSION 0.67.1 29 ENV HUGO_URL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz 30 RUN wget -O- "${HUGO_URL}" | tar xz 31 32 # Download kubectl 33 FROM alpine:3.10 as download-kubectl 34 ENV KUBECTL_VERSION v1.12.0 35 ENV KUBECTL_URL https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl 36 RUN wget -O kubectl "${KUBECTL_URL}" 37 RUN chmod +x kubectl 38 39 FROM node:12.22.7-stretch as runtime_deps 40 ENV FIREBASE_TOOLS_VERSION 7.13.1 41 RUN npm install -g firebase-tools@${FIREBASE_TOOLS_VERSION} postcss postcss-cli 42 WORKDIR /app/docs 43 ENV AUTOPREFIXER_VERSION 9.8.6 44 RUN npm install autoprefixer@${AUTOPREFIXER_VERSION} 45 COPY --from=download-docsy /docsy ./themes/docsy 46 COPY --from=download-hugo /hugo /usr/local/bin/ 47 COPY --from=download-kubectl /kubectl /usr/local/bin/ 48 49 FROM golang:1.19 as webhook 50 WORKDIR /skaffold 51 COPY . . 52 RUN go build -o /webhook webhook/webhook.go 53 54 FROM runtime_deps 55 COPY --from=webhook /webhook /webhook