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
+
1
12
FROM amazonlinux:2
2
13
3
14
ENV RUBY_VERSION="2.6.5" \
@@ -11,18 +22,17 @@ ENV RUBY_VERSION="2.6.5" \
11
22
GOLANG_VERSION="1.13.1" \
12
23
GOLANG_12_VERSION="1.12.9" \
13
24
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"
16
27
17
28
ARG CHINA_REGION
18
29
19
30
# **************** Utilities *********************************************
20
31
ENV DOCKER_BUCKET="download.docker.com" \
21
32
DOCKER_CHANNEL="stable" \
22
33
DOCKER_18_SHA256="c4857639514471e2d1aa6d567880b7fc226437ede462021ed44157d4dcd11dc8" \
23
- DOCKER_SHA256="44158b9fe44e8b5d3c1226a5d880425850d6f8ec383e4cf053f401e1a8fc269d " \
34
+ DOCKER_SHA256="9cd49fe82f6b7ec413b04daef35bc0c87b01d6da67611e5beef36291538d3145 " \
24
35
DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034" \
25
- GITVERSION_VERSION="4.0.0" \
26
36
DEBIAN_FRONTEND="noninteractive" \
27
37
SRC_DIR="/usr/src" \
28
38
EPEL_REPO="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
@@ -57,9 +67,22 @@ RUN set -ex \
57
67
perl-IO-Pty-Easy libserf subversion-perl tcl perl-TimeDate \
58
68
perl-YAML-LibYAML bzrtools python-configobj \
59
69
sgml-common xmlto libxslt \
60
- tk xorg-x11-server-Xvfb expect parallel rsync \
70
+ tk xorg-x11-server-Xvfb expect rsync \
61
71
&& yum clean all
62
72
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
+
63
86
# Install Docker
64
87
ENV DOCKER_18_PATH=/usr/local/bin/docker18
65
88
ENV DOCKER_PATH=/usr/local/bin/docker19
@@ -90,23 +113,25 @@ RUN set -ex \
90
113
&& useradd -g dockremap dockremap \
91
114
&& echo 'dockremap:165536:65536' >> /etc/subuid \
92
115
&& 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
104
124
105
125
VOLUME /var/lib/docker
106
126
107
127
# Configure SSH
108
128
COPY ssh_config /root/.ssh/config
109
129
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
+
110
135
COPY runtimes.yml /codebuild/image/config/runtimes.yml
111
136
112
137
COPY dockerd-entrypoint.sh /usr/local/bin/
@@ -283,7 +308,7 @@ ENV PATH="/root/.local/bin:$PATH"
283
308
RUN set -ex \
284
309
&& /usr/local/python38/bin/pip3 install --user aws-sam-cli \
285
310
&& 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"
287
312
288
313
RUN cd /usr/local/python38/bin \
289
314
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
@@ -484,7 +509,7 @@ RUN set -ex \
484
509
&& yum clean all
485
510
# **************** END JAVA ****************************************************
486
511
487
- # **************** GO (latest 1.13) **********************************************************
512
+ # **************** GO 1.13 **********************************************************
488
513
ENV GOLANG_DOWNLOAD_SHA256="8af8787b7c2a3c0eb3f20f872577fcb6c36098bf725c59c4923921443084c807" \
489
514
GOPATH="/go" \
490
515
DEP_VERSION="0.5.1" \
@@ -518,16 +543,6 @@ RUN set -ex \
518
543
519
544
# **************** END GO **********************************************************
520
545
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
-
531
546
RUN set -ex \
532
547
&& yum install -y openssl \
533
548
&& curl -o stunnel-5.55.tar.gz https://www.stunnel.org/downloads/stunnel-5.55.tar.gz \
0 commit comments