-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
60 lines (44 loc) · 1.51 KB
/
Dockerfile
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
60
## set base image
#
FROM debian
# Set correct environment variables.
ENV HOME /root
## install packages
#
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get upgrade -y \
# && apt-get install -y apt-utils \
&& apt-get install -y \
vim \
less \
lsb-release \
&& apt-get clean \
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
## install terraform
#
RUN wget -qO hashicorp.key https://apt.releases.hashicorp.com/gpg \
&& gpg --dearmor hashicorp.key \
&& mv hashicorp.key.gpg /usr/share/keyrings/hashicorp-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/hashicorp.list \
&& apt-get update \
&& apt-get install terraform \
&& rm hashicorp.key
## install Azure CLI
#
RUN curl -sL https://aka.ms/InstallAzureCLIDeb -o "azure_install.sh" \
&& bash azure_install.sh \
&& rm azure_install.sh
## install AWS CLI
#
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -rf aws awscliv2.zip
## add a user account
#
# RUN useradd -ms /bin/bash user
# copy contents of local src directory to the working directory
# COPY ./src src