diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 580f03c..4695202 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,6 +53,7 @@ jobs: if [ "${{ matrix.folder }}" == "aws" ]; then docker run --rm ${{ env.IMAGE_NAME }} sh -c "python3 -c \"import boto3; print(boto3.__version__)\"" + docker run --rm ${{ env.IMAGE_NAME }} sh -c "cat session-manager-plugin" fi if [ "${{ matrix.folder }}" == "gcp" ]; then diff --git a/aws/Dockerfile b/aws/Dockerfile index 32b13ef..195859e 100644 --- a/aws/Dockerfile +++ b/aws/Dockerfile @@ -1,5 +1,21 @@ ARG REPOSITORY_BASE_PATH +# Can't bump the Go version above 1.16 until this is solved: https://github.com/aws/session-manager-plugin/issues/23 +FROM golang:1.15.3-alpine AS ssm-builder + +ARG VERSION=1.2.650.0 +RUN set -ex && apk add --no-cache make git gcc libc-dev curl bash zip && \ + curl -sLO https://github.com/aws/session-manager-plugin/archive/${VERSION}.tar.gz && \ + mkdir -p /go/src/github.com && \ + tar xzf ${VERSION}.tar.gz && \ + mv session-manager-plugin-${VERSION} /go/src/github.com/session-manager-plugin && \ + cd /go/src/github.com/session-manager-plugin && \ + make release + +ARG REPOSITORY_BASE_PATH + FROM ${REPOSITORY_BASE_PATH}:latest +COPY --from=ssm-builder /go/src/github.com/session-manager-plugin/bin/linux_*_plugin/session-manager-plugin /usr/local/bin/ + RUN pip install boto3 --break-system-packages