Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thar-control: pin amazon-ssm-agent to a version that supports imdsv2 #709

Merged
merged 1 commit into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions extras/host-containers/thar-control/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM amazonlinux:2
ARG IMAGE_VERSION
# Make the container image version a mandatory build argument
ARG SSM_AGENT_VERSION
# Mandatory build arguments
RUN test -n "$IMAGE_VERSION"
RUN test -n "$SSM_AGENT_VERSION"
LABEL "org.opencontainers.image.version"="$IMAGE_VERSION"

RUN yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm shadow-utils
RUN yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/"$SSM_AGENT_VERSION"/linux_amd64/amazon-ssm-agent.rpm shadow-utils

# Add motd explaining the control container.
RUN rm -f /etc/motd /etc/issue
Expand Down
3 changes: 2 additions & 1 deletion extras/host-containers/thar-control/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
IMAGE_VERSION=`cat VERSION`

SSM_AGENT_VERSION ?= 2.3.842.0
DOCKER_IMAGE := thar-control
DOCKER_IMAGE_REF_RELEASE := $(DOCKER_IMAGE):$(CONTROL_CTR_VERSION)
SHORT_SHA ?= $(shell git rev-parse --short=8 HEAD)
Expand All @@ -9,6 +9,7 @@ container:
docker build --network=host \
--tag $(DOCKER_IMAGE_REF) \
--build-arg IMAGE_VERSION="$(IMAGE_VERSION)" \
--build-arg SSM_AGENT_VERSION="$(SSM_AGENT_VERSION)" \
--build-arg BUILD_LDFLAGS='' \
.

Expand Down