Skip to content

Commit 172acc8

Browse files
authored
Merge pull request aws#364 from awszhen/aws/20.06.15
Update Linux and ARM Dockerfiles
2 parents 9539ebd + e130ad7 commit 172acc8

File tree

22 files changed

+1045
-124
lines changed

22 files changed

+1045
-124
lines changed

al2/aarch64/standard/1.0/Dockerfile

+43-28
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Amazon Software License (the "License"). You may not use this file except in compliance with the License.
4+
# A copy of the License is located at
5+
#
6+
# http://aws.amazon.com/asl/
7+
#
8+
# or in the "license" file accompanying this file.
9+
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied.
10+
# See the License for the specific language governing permissions and limitations under the License.
11+
112
FROM amazonlinux:2
213

314
ENV RUBY_VERSION="2.6.5" \
@@ -11,18 +22,17 @@ ENV RUBY_VERSION="2.6.5" \
1122
GOLANG_VERSION="1.13.1" \
1223
GOLANG_12_VERSION="1.12.9" \
1324
DOCKER_18_VERSION="18.09.6" \
14-
DOCKER_VERSION="19.03.1" \
15-
DOCKER_COMPOSE_VERSION="1.24.0"
25+
DOCKER_VERSION="19.03.11" \
26+
DOCKER_COMPOSE_VERSION="1.26.0"
1627

1728
ARG CHINA_REGION
1829

1930
#**************** Utilities *********************************************
2031
ENV DOCKER_BUCKET="download.docker.com" \
2132
DOCKER_CHANNEL="stable" \
2233
DOCKER_18_SHA256="c4857639514471e2d1aa6d567880b7fc226437ede462021ed44157d4dcd11dc8" \
23-
DOCKER_SHA256="44158b9fe44e8b5d3c1226a5d880425850d6f8ec383e4cf053f401e1a8fc269d" \
34+
DOCKER_SHA256="9cd49fe82f6b7ec413b04daef35bc0c87b01d6da67611e5beef36291538d3145" \
2435
DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034" \
25-
GITVERSION_VERSION="4.0.0" \
2636
DEBIAN_FRONTEND="noninteractive" \
2737
SRC_DIR="/usr/src" \
2838
EPEL_REPO="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
@@ -57,9 +67,22 @@ RUN set -ex \
5767
perl-IO-Pty-Easy libserf subversion-perl tcl perl-TimeDate \
5868
perl-YAML-LibYAML bzrtools python-configobj \
5969
sgml-common xmlto libxslt \
60-
tk xorg-x11-server-Xvfb expect parallel rsync \
70+
tk xorg-x11-server-Xvfb expect rsync \
6171
&& yum clean all
6272

73+
# Install Git
74+
RUN set -ex \
75+
&& GIT_VERSION=2.27.0 \
76+
&& GIT_TAR_FILE=git-$GIT_VERSION.tar.gz \
77+
&& GIT_SRC=https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz \
78+
&& curl -L -o $GIT_TAR_FILE $GIT_SRC \
79+
&& tar zxvf $GIT_TAR_FILE \
80+
&& cd git-$GIT_VERSION \
81+
&& make -j4 prefix=/usr \
82+
&& make install prefix=/usr \
83+
&& cd .. ; rm -rf git-$GIT_VERSION \
84+
&& rm -rf $GIT_TAR_FILE /tmp/*
85+
6386
# Install Docker
6487
ENV DOCKER_18_PATH=/usr/local/bin/docker18
6588
ENV DOCKER_PATH=/usr/local/bin/docker19
@@ -90,23 +113,25 @@ RUN set -ex \
90113
&& useradd -g dockremap dockremap \
91114
&& echo 'dockremap:165536:65536' >> /etc/subuid \
92115
&& echo 'dockremap:165536:65536' >> /etc/subgid \
93-
&& wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind
94-
# TODO there is no existing docker compose executable for ARM.
95-
# && curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-Linux-x86_64 > /usr/local/bin/docker-compose \
96-
# && chmod +x /usr/local/bin/dind /usr/local/bin/docker-compose
97-
# && docker-compose version
98-
99-
# https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_installation.html
100-
RUN curl -sS -o /usr/local/bin/aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/bin/linux/amd64/aws-iam-authenticator \
101-
&& curl -sS -o /usr/local/bin/kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/bin/linux/amd64/kubectl \
102-
&& curl -sS -o /usr/local/bin/ecs-cli https://amazon-ecs-cli.s3.amazonaws.com/ecs-cli-linux-amd64-latest \
103-
&& chmod +x /usr/local/bin/kubectl /usr/local/bin/aws-iam-authenticator /usr/local/bin/ecs-cli
116+
&& wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind \
117+
&& chmod +x /usr/local/bin/dind
118+
119+
# AWS Tools
120+
# https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html
121+
RUN curl -sS -o /usr/local/bin/aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/arm64/aws-iam-authenticator \
122+
&& curl -sS -o /usr/local/bin/kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/arm64/kubectl \
123+
&& chmod +x /usr/local/bin/kubectl /usr/local/bin/aws-iam-authenticator
104124

105125
VOLUME /var/lib/docker
106126

107127
# Configure SSH
108128
COPY ssh_config /root/.ssh/config
109129

130+
# Configure SSM
131+
RUN set -ex \
132+
&& yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_arm64/amazon-ssm-agent.rpm
133+
COPY amazon-ssm-agent.json /etc/amazon/ssm/
134+
110135
COPY runtimes.yml /codebuild/image/config/runtimes.yml
111136

112137
COPY dockerd-entrypoint.sh /usr/local/bin/
@@ -283,7 +308,7 @@ ENV PATH="/root/.local/bin:$PATH"
283308
RUN set -ex \
284309
&& /usr/local/python38/bin/pip3 install --user aws-sam-cli \
285310
&& sam --version \
286-
&& /usr/local/python38/bin/pip3 install awscli boto3
311+
&& /usr/local/python38/bin/pip3 install awscli boto3 "docker-compose==$DOCKER_COMPOSE_VERSION"
287312

288313
RUN cd /usr/local/python38/bin \
289314
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
@@ -484,7 +509,7 @@ RUN set -ex \
484509
&& yum clean all
485510
#**************** END JAVA ****************************************************
486511

487-
#**************** GO (latest 1.13) **********************************************************
512+
#**************** GO 1.13 **********************************************************
488513
ENV GOLANG_DOWNLOAD_SHA256="8af8787b7c2a3c0eb3f20f872577fcb6c36098bf725c59c4923921443084c807" \
489514
GOPATH="/go" \
490515
DEP_VERSION="0.5.1" \
@@ -518,16 +543,6 @@ RUN set -ex \
518543

519544
#**************** END GO **********************************************************
520545

521-
# TODO Download libgit2 (no aarch version at rpmfind.net/linux/centos/7/extras)
522-
523-
RUN set -ex \
524-
&& wget "https://github.com/GitTools/GitVersion/releases/download/v${GITVERSION_VERSION}/GitVersion-bin-net40-v${GITVERSION_VERSION}.zip" -O /tmp/GitVersion_${GITVERSION_VERSION}.zip \
525-
&& mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
526-
&& unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
527-
&& rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
528-
&& echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
529-
&& chmod +x /usr/local/bin/gitversion
530-
531546
RUN set -ex \
532547
&& yum install -y openssl \
533548
&& curl -o stunnel-5.55.tar.gz https://www.stunnel.org/downloads/stunnel-5.55.tar.gz \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"Profile":{
3+
"ShareCreds" : true,
4+
"ShareProfile" : ""
5+
},
6+
"Mds": {
7+
"CommandWorkersLimit" : 5,
8+
"StopTimeoutMillis" : 20000,
9+
"Endpoint": "",
10+
"CommandRetryLimit": 15
11+
},
12+
"Ssm": {
13+
"Endpoint": "",
14+
"HealthFrequencyMinutes": 5,
15+
"CustomInventoryDefaultLocation" : "",
16+
"AssociationLogsRetentionDurationHours" : 24,
17+
"RunCommandLogsRetentionDurationHours" : 336,
18+
"SessionLogsRetentionDurationHours" : 336
19+
},
20+
"Mgs": {
21+
"Region": "",
22+
"Endpoint": "",
23+
"StopTimeoutMillis" : 20000,
24+
"SessionWorkersLimit" : 1000
25+
},
26+
"Agent": {
27+
"Region": "",
28+
"OrchestrationRootDir": "",
29+
"ContainerMode": true
30+
},
31+
"Os": {
32+
"Lang": "en-US",
33+
"Name": "",
34+
"Version": "1"
35+
},
36+
"S3": {
37+
"Endpoint": "",
38+
"Region": "",
39+
"LogBucket":"",
40+
"LogKey":""
41+
},
42+
"Kms": {
43+
"Endpoint": ""
44+
}
45+
}

al2/aarch64/standard/1.0/runtimes.yml

+3
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,6 @@ runtimes:
124124
else
125125
echo "Not installing Docker version 18, please enable privileged mode for your project if you want to use Docker."
126126
fi
127+
19:
128+
commands:
129+
- echo "Using Docker 19"

0 commit comments

Comments
 (0)