@@ -19,30 +19,6 @@ RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
1919 go build -mod=readonly -ldflags="-s -w" -o goapp
2020
2121
22- # ## Builder Python ###
23- FROM python:3.10.10-alpine${ALPINE_VERSION:-3.17} as builder-python
24-
25- ARG AWS_CLI_VERSION=2.11.0
26- RUN apk add --no-cache git unzip groff build-base libffi-dev cmake
27- RUN git clone --single-branch --depth 1 -b ${AWS_CLI_VERSION} https://github.com/aws/aws-cli.git
28-
29- WORKDIR aws-cli
30- RUN python -m venv venv
31- RUN . venv/bin/activate
32- RUN scripts/installers/make-exe
33- RUN unzip -q dist/awscli-exe.zip
34- RUN aws/install --bin-dir /aws-cli-bin
35- RUN /aws-cli-bin/aws --version
36-
37- # reduce image size: remove autocomplete and examples
38- RUN rm -rf \
39- /usr/local/aws-cli/v2/current/dist/aws_completer \
40- /usr/local/aws-cli/v2/current/dist/awscli/data/ac.index \
41- /usr/local/aws-cli/v2/current/dist/awscli/examples
42- RUN find /usr/local/aws-cli/v2/current/dist/awscli/data -name completions-1*.json -delete
43- RUN find /usr/local/aws-cli/v2/current/dist/awscli/botocore/data -name examples-1.json -delete
44-
45-
4622# ## Binary ###
4723# FROM golang:1.19.5-alpine3.17
4824FROM nginx:${NGINX_VERSION:-1.23-alpine}
@@ -84,10 +60,23 @@ LABEL maintainer="$AUTHOR" \
8460 fr.hbis.docker.base.version="$BUILD_VERSION"
8561
8662ENV GIN_MODE=release
87- COPY --from=alpine/k8s:1.26.2 /usr/bin/ /usr/local/bin/
88- COPY --from=builder-python /usr/local/aws-cli/ /usr/local/aws-cli/
89- COPY --from=builder-python /aws-cli-bin/ /usr/local/bin/
63+
64+ RUN apk add --no-cache \
65+ build-base \
66+ git \
67+ curl \
68+ make \
69+ bash \
70+ nano
71+
72+ # COPY --from=alpine/k8s:1.26.2 /usr/local/bin/ /usr/local/bin/
73+ # COPY --from=devopscorner/aws-cli:latest /usr/local/aws-cli/ /usr/local/aws-cli/
74+ # COPY --from=devopscorner/aws-cli:latest /aws-cli-bin/ /usr/local/bin/
75+ COPY --from=devopscorner/cicd:alpine /root/.tfenv /root/.tfenv
76+ COPY --from=devopscorner/cicd:alpine /usr/local/bin/ /usr/local/bin/
77+ COPY --from=devopscorner/cicd:alpine /usr/local/aws-cli/ /usr/local/aws-cli/
9078COPY --from=builder-go /go/src/app/goapp /usr/local/bin/k8s-context
79+ COPY --from=builder-go /go/src/app/goapp /usr/local/bin/kc
9180
9281EXPOSE 22 80 443
9382
0 commit comments