File tree 3 files changed +53
-2
lines changed
3 files changed +53
-2
lines changed Original file line number Diff line number Diff line change
1
+ FROM amazonlinux:2
2
+
3
+
4
+ # ##############################################################################
5
+ # Install prereqs
6
+ # ##############################################################################
7
+ RUN yum -y update \
8
+ && yum -y install \
9
+ tar \
10
+ git \
11
+ sudo \
12
+ # Python
13
+ python3 \
14
+ python3-devel \
15
+ python3-pip \
16
+ make \
17
+ cmake3 \
18
+ gcc \
19
+ gcc-c++ \
20
+ which \
21
+ && yum clean all \
22
+ && rm -rf /var/cache/yum \
23
+ && cmake --version \
24
+ && ctest --version
25
+
26
+ # ##############################################################################
27
+ # Python/AWS CLI
28
+ # ##############################################################################
29
+ RUN python3 -m pip install setuptools virtualenv \
30
+ && python3 -m pip install --upgrade awscli \
31
+ && aws --version
32
+
33
+ # ##############################################################################
34
+ # Install pre-built CMake
35
+ # ##############################################################################
36
+ WORKDIR /tmp
37
+ RUN curl -sSL https://d19elf31gohf1l.cloudfront.net/_binaries/cmake/cmake-3.13-manylinux1-x64.tar.gz -o cmake.tar.gz \
38
+ && tar xvzf cmake.tar.gz -C /usr/local \
39
+ && cmake --version \
40
+ && rm -f /tmp/cmake.tar.gz
41
+
42
+ # ##############################################################################
43
+ # Install entrypoint
44
+ # ##############################################################################
45
+ ADD entrypoint.sh /usr/local/bin/builder
46
+ RUN chmod a+x /usr/local/bin/builder
47
+ ENTRYPOINT ["/usr/local/bin/builder" ]
Original file line number Diff line number Diff line change 1
- FROM amazonlinux:latest
1
+ FROM amazonlinux:2023
2
2
3
3
4
4
# ##############################################################################
Original file line number Diff line number Diff line change @@ -70,7 +70,11 @@ def current_host():
70
70
def _discover_host ():
71
71
platform = current_os ()
72
72
if platform == 'linux' :
73
- if _file_contains ('/etc/system-release' , 'Amazon Linux release 2' ):
73
+ # Note: that AL2 and AL2023 have the same substring. Check for AL2023 explicitly.
74
+ # And also check that AL2 has "2 (", which is common to all base distributions of AL2
75
+ if _file_contains ('/etc/system-release' , 'Amazon Linux release 2023' ):
76
+ return 'al2023'
77
+ if _file_contains ('/etc/system-release' , 'Amazon Linux release 2 (' ):
74
78
return 'al2'
75
79
if _file_contains ('/etc/system-release' , 'Bare Metal' ) or _file_contains ('/etc/system-release' , 'Amazon Linux AMI' ):
76
80
return 'al2012'
You can’t perform that action at this time.
0 commit comments