-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (45 loc) · 1.24 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
61
62
FROM python:3.8-alpine
MAINTAINER Daniel San "[email protected]"
LABEL maintainer="Daniel San" \
description="Container to connect to AWS services"
RUN apk update
RUN apk add --no-cache --virtual .build-deps
RUN apk add --no-cache \
musl-dev \
libffi-dev \
openssl-dev \
python3-dev \
libsodium-dev \
gcc \
git \
openssh-client \
zsh
RUN addgroup -S awscli && adduser -S awscli -G awscli
WORKDIR /home/awscli
RUN mkdir venvs && \
python -m venv venvs/aws && \
python -m venv venvs/eb
RUN source venvs/aws/bin/activate && \
pip install --upgrade pip && \
pip install --no-cache-dir awscli && \
deactivate
RUN source venvs/eb/bin/activate && \
pip install --upgrade pip setuptools wheel && \
SODIUM_INSTALL=system pip install pynacl && \
pip install --no-cache-dir 'awsebcli>=3.18.0,<3.19' && \
pip uninstall -y wheel && \
deactivate
RUN chown -R awscli:awscli venvs
USER awscli
ADD --chown=awscli:awscli https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh /home/awscli
RUN sh install.sh && rm install.sh
USER root
RUN apk del \
musl-dev \
libffi-dev \
openssl-dev \
python3-dev \
libsodium-dev \
gcc \
git
USER awscli