1
- # Dockerfile.ubuntu
1
+ # Dockerfile.xenial
2
2
#
3
- # This file acts partly as a Docker recipe for building Cloe on Ubuntu.
4
- # It is currently only tested with Ubuntu 16.04.
5
- #
6
- # If you are behind a proxy, make sure to pass in the respective HTTP_PROXY,
7
- # HTTPS_PROXY, and NO_PROXY variables.
3
+ # See Dockerfile.focal for documentation of each of the lines.
8
4
ARG BUILD_FROM=ubuntu:16.04
9
5
ARG DEPLOY_FROM=${BUILD_FROM}
10
6
@@ -13,7 +9,6 @@ FROM ${BUILD_FROM} AS build
13
9
# Install Newer CMake and GCC Packages
14
10
RUN apt-get update && \
15
11
apt-get install --no-install-recommends -y apt-transport-https ca-certificates gnupg software-properties-common wget && \
16
- # Add cmake repository:
17
12
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - > /etc/apt/trusted.gpg.d/kitware.gpg && \
18
13
apt-add-repository "deb https://apt.kitware.com/ubuntu/ xenial main" && \
19
14
add-apt-repository "ppa:ubuntu-toolchain-r/test" && \
@@ -58,8 +53,6 @@ RUN . /etc/profile.d/pyenv.sh && \
58
53
pyenv global ${PYTHON_VERSION}
59
54
60
55
# Install System Packages
61
- #
62
- # These packages are required for building and testing Cloe.
63
56
COPY Makefile.setup /cloe/Makefile.setup
64
57
RUN apt-get update && \
65
58
apt-get install -y make locales && \
@@ -79,12 +72,10 @@ RUN . /etc/profile.d/pyenv.sh && \
79
72
install-python-deps
80
73
81
74
# Install and Setup Conan
82
- #
83
- # You may not want to use the default Conan remote (conan-center), so we use
84
- # whatever is stored in the build arguments CONAN_REMOTE. Currently, only
85
- # anonymous access is possible in this Dockerfile.
86
75
ARG CONAN_REMOTE=https://conan.bintray.com
87
76
ARG CONAN_REMOTE_VERIFY_SSL=true
77
+ ARG CONAN_LOGIN_USERNAME
78
+ ARG CONAN_PASSWORD
88
79
RUN . /etc/profile.d/pyenv.sh && \
89
80
conan profile new --detect default && \
90
81
conan profile update settings.compiler.libcxx=libstdc++11 default && \
@@ -93,45 +84,28 @@ RUN . /etc/profile.d/pyenv.sh && \
93
84
conan remote add default ${CONAN_REMOTE} ${CONAN_REMOTE_VERIFY_SSL}
94
85
95
86
# Build and Install Cloe
96
- #
97
- # All common processes are made easy to apply by writing target recipes in the
98
- # Makefile at the root of the repository. This also acts as a form of
99
- # documentation.
100
87
WORKDIR /cloe
101
88
COPY . /cloe
102
89
ARG WITH_VTD=0
103
90
ARG PACKAGE_TARGET=package-select
104
91
RUN . /etc/profile.d/pyenv.sh && \
105
- # Export our own Conan recipes, in case they are not available in the
106
- # CONAN_REMOTE specified above.
92
+ export CONAN_NON_INTERACTIVE=yes && \
93
+ if [ ${CONAN_LOGIN_USERNAME} != "" ]; then \
94
+ CONAN_LOGIN_USERNAME="${CONAN_LOGIN_USERNAME}" CONAN_PASSWORD="${CONAN_PASSWORD}" conan user --remote=default -p || exit 1; \
95
+ fi && \
107
96
make export-vendor export && \
108
- # Build all the packages, except for vtd, because that currently requires
109
- # dependencies we don't have in the Docker container.
110
- # You can specify more than one package here, see the Makefile for more
111
- # information on the WITH_*, PACKAGES, NOBUILD_PKGS, and BUILD_PKGS variables.
112
97
make WITH_VTD=${WITH_VTD} ${PACKAGE_TARGET} && \
113
- # In the above commands, Conan downloads and creates packages into its
114
- # local cache. We don't need the build directories, since we have deployed
115
- # Cloe, so we should clean up to keep the Docker image down.
116
- conan remove \* -b -f
98
+ conan remove \* -b -f && \
99
+ conan user --clean
117
100
101
+ ARG VI_LIC_SERVER
118
102
RUN . /etc/profile.d/pyenv.sh && \
119
- # Run smoketests.
120
103
export LC_ALL=C.UTF-8 LANG=C.UTF-8 && \
104
+ export VI_LIC_SERVER="${VI_LIC_SERVER}" && \
121
105
make WITH_VTD=${WITH_VTD} smoketest && \
122
- # Deploy all the Cloe packages to INSTALL_DIR, which is /usr/local by
123
- # default. This will also populate BUILD_DIR, so that should be removed
124
- # afterwards to prevent this image from getting too big.
125
106
make WITH_VTD=${WITH_VTD} INSTALL_DIR="/deploy" deploy
126
107
127
108
# Create Deploy Image
128
- #
129
- # Unfortunately, there are still some issues with cloe-engine not finding
130
- # libcloe-runtime.so, so we need to explicitly set LD_LIBRARY_PATH.
131
- #
132
- # This image can now be used to work with stack files. You should mount in
133
- # whatever directory contains your stack files for best results, otherwise
134
- # the engine might try to read files that it doesn't have in its own filesystem.
135
109
FROM ${DEPLOY_FROM}
136
110
COPY --from=build /deploy /usr/local/
137
111
ENV LD_LIBRARY_PATH=/usr/local/lib
0 commit comments