-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathDockerfile.build.template
45 lines (41 loc) · 1.41 KB
/
Dockerfile.build.template
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
{% extends "Dockerfile.common.build.template" %}
{% block install %}
# Combine all installation and removal steps in a single RUN command to reduce the final image size.
# This is because each Dockerfile command creates a new layer which necessarily adds size to the
# final image. This trick allows to decrease the image size by hundreds of MBs.
RUN apt-get update \
&& env DEBIAN_FRONTEND=noninteractive apt-get install -y \
binutils \
expect \
libcurl4-openssl-dev \
libprotobuf-c-dev \
locales \
openssl \
python3 \
python3-cryptography \
python3-pip \
python3-protobuf \
python3-pyelftools \
&& /usr/bin/python3 -B -m pip install click jinja2 protobuf \
'tomli>=1.1.0' 'tomli-w>=0.4.0' \
# For compatibility with Gramine v1.3 or lower
&& /usr/bin/python3 -B -m pip install 'toml>=0.10' \
# Since all needed pip packages are installed, we can uninstall python3-pip safely
&& apt remove -y python3-pip \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
{% if debug %}
RUN apt-get update \
&& env DEBIAN_FRONTEND=noninteractive apt-get install -y \
gdb \
less \
libunwind8 \
python3-pytest \
strace \
vim
{% endif %}
RUN locale-gen en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
{% endblock %}