Skip to content

Commit

Permalink
chore: add aws-gcloud-azure Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
thsig committed Mar 29, 2021
1 parent 4b24240 commit 610c93f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,20 @@ jobs:
TAG=gardendev/garden-aws-gcloud:${CIRCLE_SHA1}
docker build -t ${TAG} --build-arg TAG=${CIRCLE_SHA1} -f support/aws-gcloud.Dockerfile dist/alpine-amd64
docker push ${TAG}
build-docker-aws-gcloud-azure:
<<: *node-config
steps:
- setup_remote_docker:
docker_layer_caching: true
- checkout
- *attach-workspace
- run:
name: Build image and push to registry
command: |
docker login -u $DOCKER_USER -p $DOCKER_PASS
TAG=gardendev/garden-aws-gcloud-azure:${CIRCLE_SHA1}
docker build -t ${TAG} --build-arg TAG=${CIRCLE_SHA1} -f support/aws-gcloud-azure.Dockerfile dist/alpine-amd64
docker push ${TAG}
build-docker-buster:
<<: *node-config
steps:
Expand Down Expand Up @@ -794,6 +808,10 @@ workflows:
<<: *only-internal-prs
context: docker
requires: [build-docker-alpine]
- build-docker-aws-gcloud-azure:
<<: *only-internal-prs
context: docker
requires: [build-docker-alpine]
- build-docker-buster:
<<: *only-internal-prs
context: docker
Expand Down
33 changes: 33 additions & 0 deletions support/aws-gcloud-azure.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ARG TAG=latest
FROM google/cloud-sdk:277.0.0-alpine as gcloud

RUN gcloud components install kubectl

FROM gardendev/garden:${TAG}

ENV CLOUDSDK_PYTHON=python3

COPY --from=gcloud /google-cloud-sdk /google-cloud-sdk

RUN apk add --no-cache python3 \
&& ln -s /google-cloud-sdk/bin/* /usr/local/bin/ \
&& chmod +x /usr/local/bin/*

RUN apk add --no-cache python py-pip \
&& pip install awscli==1.17.9 --upgrade \
&& apk del py-pip

RUN curl -o aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.15.10/2020-02-22/bin/linux/amd64/aws-iam-authenticator \
&& chmod +x ./aws-iam-authenticator \
&& mv ./aws-iam-authenticator /usr/bin/

# Build dependencies
RUN apk add --virtual=build gcc libffi-dev musl-dev openssl-dev make py3-pip\
# Runtime dependency
&& apk add python3-dev \
&& pip3 install virtualenv \
&& python3 -m virtualenv /azure-cli \
&& /azure-cli/bin/python -m pip --no-cache-dir install azure-cli \
&& echo "#!/usr/bin/env sh" > /usr/bin/az \
&& echo '/azure-cli/bin/python -m azure.cli "$@"' >> /usr/bin/az \
&& chmod +x /usr/bin/az

0 comments on commit 610c93f

Please sign in to comment.