forked from conan-io/conan-docker-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
99 lines (93 loc) · 3.97 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
FROM ubuntu:artful
LABEL maintainer="Luis Martinez de Bartolome <luism@jfrog.com>"
ENV LLVM_VERSION=4.0 \
CC=clang \
CXX=clang++ \
CMAKE_C_COMPILER=clang \
CMAKE_CXX_COMPILER=clang++ \
PYENV_ROOT=/opt/pyenv \
PATH=/opt/pyenv/shims:${PATH}
COPY sources.list /etc/apt/sources.list
RUN dpkg --add-architecture i386 \
&& apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
sudo=1.8.20p2-1ubuntu1 \
wget=1.19.1-3ubuntu1 \
git=1:2.14.1-1ubuntu4 \
g++-multilib=4:7.2.0-1ubuntu1 \
clang-${LLVM_VERSION}=1:4.0.1-6 \
llvm-${LLVM_VERSION}=1:4.0.1-6 \
llvm-${LLVM_VERSION}-dev=1:4.0.1-6 \
llvm-${LLVM_VERSION}-runtime=1:4.0.1-6 \
llvm=1:4.0-37~exp3ubuntu1 \
make=4.1-9.1 \
libc6-dev-i386=2.26-0ubuntu2.1 \
libgmp-dev=2:6.1.2+dfsg-1 \
libmpfr-dev=3.1.6-1 \
libmpc-dev=1.0.3-2 \
nasm=2.13.01-2 \
dh-autoreconf=14 \
libffi-dev=3.2.1-6 \
libssl-dev=1.0.2* \
ninja-build=1.7.2-3 \
libc++-dev=3.9.1-3 \
libc++-dev:i386=3.9.1-3 \
libc++abi-dev=3.9.1-3 \
libc++abi-dev:i386=3.9.1-3 \
pkg-config=0.29.1-0ubuntu2 \
subversion=1.9.7-2ubuntu1 \
zlib1g-dev=1:1.* \
libbz2-dev=1.* \
libsqlite3-dev=3.* \
libreadline-dev=7.* \
xz-utils=5.* \
curl=7.* \
libncurses5-dev=6.* \
libncursesw5-dev=6.* \
liblzma-dev=5.* \
ca-certificates=20170717 \
autoconf-archive \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${LLVM_VERSION} 100 \
&& update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-${LLVM_VERSION} 100 \
&& ln -s /usr/include/locale.h /usr/include/xlocale.h \
&& rm -rf /var/lib/apt/lists/* \
&& wget -q --no-check-certificate https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz \
&& tar -xzf cmake-3.14.3-Linux-x86_64.tar.gz \
--exclude=bin/cmake-gui \
--exclude=doc/cmake \
--exclude=share/cmake-3.12/Help \
&& cp -fR cmake-3.14.3-Linux-x86_64/* /usr \
&& rm -rf cmake-3.14.3-Linux-x86_64 \
&& rm cmake-3.14.3-Linux-x86_64.tar.gz \
&& groupadd 1001 -g 1001 \
&& groupadd 1000 -g 1000 \
&& groupadd 2000 -g 2000 \
&& groupadd 999 -g 999 \
&& useradd -ms /bin/bash conan -g 1001 -G 1000,2000,999 \
&& printf "conan:conan" | chpasswd \
&& adduser conan sudo \
&& printf "conan ALL= NOPASSWD: ALL\\n" >> /etc/sudoers \
&& wget --no-check-certificate --quiet -O /tmp/pyenv-installer https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer \
&& chmod +x /tmp/pyenv-installer \
&& /tmp/pyenv-installer \
&& rm /tmp/pyenv-installer \
&& update-alternatives --install /usr/bin/pyenv pyenv /opt/pyenv/bin/pyenv 100 \
&& PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.7.1 \
&& pyenv global 3.7.1 \
&& pip install -q --upgrade --no-cache-dir pip \
&& pip install -q --no-cache-dir conan conan-package-tools \
&& chown -R conan:1001 /opt/pyenv \
# remove all __pycache__ directories created by pyenv
&& find /opt/pyenv -iname __pycache__ -print0 | xargs -0 rm -rf \
&& update-alternatives --install /usr/bin/python python /opt/pyenv/shims/python 100 \
&& update-alternatives --install /usr/bin/python3 python3 /opt/pyenv/shims/python3 100 \
&& update-alternatives --install /usr/bin/pip pip /opt/pyenv/shims/pip 100 \
&& update-alternatives --install /usr/bin/pip3 pip3 /opt/pyenv/shims/pip3 100
USER conan
WORKDIR /home/conan
RUN mkdir -p /home/conan/.conan \
&& printf 'eval "$(pyenv init -)"\n' >> ~/.bashrc \
&& printf 'eval "$(pyenv virtualenv-init -)"\n' >> ~/.bashrc