forked from asfadmin/CIRRUS-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (49 loc) · 1.75 KB
/
Dockerfile
File metadata and controls
59 lines (49 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM amazonlinux:2 as core_base
# This image can be used to do Python 3 & NodeJS development, and
# includes the AWS CLI and Terraform. It contains:
# * CLI utilities: git, make, wget, etc
# * Python 3
# * NodeJS
# * Yarn
# * AWS CLI
# * Terraform
ENV NODE_VERSION "14.x"
ENV TERRAFORM_VERSION "0.13.6"
ENV AWS_CLI_VERSION "2.7.7"
# Add NodeJS and Yarn repos & update package index
RUN \
curl -sL https://rpm.nodesource.com/setup_${NODE_VERSION} | bash - && \
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo && \
yum update -y
# CLI utilities
RUN yum install -y gcc gcc-c++ git make openssl unzip wget zip jq
# AWS & Terraform
RUN \
wget "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" && \
unzip *.zip && \
chmod +x terraform && \
mv terraform /usr/local/bin && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-$AWS_CLI_VERSION.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install
# Node JS
RUN \
yum install -y nodejs yarn
# SSM SessionManager plugin
RUN \
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm" -o "session-manager-plugin.rpm" &&\
yum install -y session-manager-plugin.rpm
WORKDIR /CIRRUS-core
# Python38 target
FROM core_base as python38
RUN \
amazon-linux-extras install python3.8 && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 -m pip install boto3
# Python3 target
FROM core_base as python3
# Python 3
RUN \
yum install -y python3-devel && \
python3 -m pip install boto3