Skip to content

Commit 13963d4

Browse files
authored
Remove user settings with distro (#25)
Several dependencies cannot handle custom `os` values, so this approach is not going to work.
1 parent 624dfa3 commit 13963d4

File tree

3 files changed

+4
-73
lines changed

3 files changed

+4
-73
lines changed

docker/debian/Dockerfile

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ RUN pipx install --pip-args='--no-cache' conan==${CONAN_VERSION} && \
6969
# ====================== GCC IMAGE ======================
7070
FROM base AS gcc
7171

72-
# These are not inherited from base image.
73-
ARG DEBIAN_VERSION
72+
# These are not inherited from the base image.
7473
ARG DEBIAN_FRONTEND=noninteractive
7574
ARG GCC_VERSION
7675

@@ -133,16 +132,6 @@ conan profile detect
133132
rm -rf /tmp/*
134133
EOF
135134

136-
# Add the distribution name and version, so they can be taken into account when
137-
# building dependencies. This requires setting the `os` field in the activated
138-
# profile where this image is used to the appropriate value.
139-
RUN <<EOF
140-
cat >> $(conan config home)/settings_user.yml <<EOT
141-
os:
142-
debian-${DEBIAN_VERSION}:
143-
EOT
144-
EOF
145-
146135
# Explicitly set the compiler flags.
147136
RUN <<EOF
148137
cat >> $(conan config home)/global.conf <<EOT
@@ -164,7 +153,7 @@ EOF
164153
# ===================== CLANG IMAGE =====================
165154
FROM base AS clang
166155

167-
# These are not inherited from base image.
156+
# These are not inherited from the base image.
168157
ARG DEBIAN_VERSION
169158
ARG DEBIAN_FRONTEND=noninteractive
170159

@@ -228,16 +217,6 @@ conan profile detect
228217
rm -rf /tmp/*
229218
EOF
230219

231-
# Add the distribution name and version, so they can be taken into account when
232-
# building dependencies. This requires setting the `os` field in the activated
233-
# profile where this image is used to the appropriate value.
234-
RUN <<EOF
235-
cat >> $(conan config home)/settings_user.yml <<EOT
236-
os:
237-
debian-${DEBIAN_VERSION}:
238-
EOT
239-
EOF
240-
241220
# Explicitly set the compiler flags and the distribution name and version.
242221
RUN <<EOF
243222
cat >> $(conan config home)/global.conf <<EOT

docker/rhel/Dockerfile

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ RUN pip install --no-cache conan==${CONAN_VERSION} gcovr==${GCOVR_VERSION}
4242
# ====================== GCC IMAGE ======================
4343
FROM base AS gcc
4444

45-
# This is not inherited from base image.
46-
ARG RHEL_VERSION
47-
4845
# Install GCC. Red Hat installs GCC as a Software Collection (SCL) package,
4946
# where typically you would run `scl enable gcc-toolset-X` to open another Bash
5047
# shell with the GCC toolset enabled. To avoid having to do so, we delete the
@@ -103,16 +100,6 @@ conan profile detect
103100
rm -rf /tmp/*
104101
EOF
105102

106-
# Add the distribution name and version, so they can be taken into account when
107-
# building dependencies. This requires setting the `os` field in the activated
108-
# profile where this image is used to the appropriate value.
109-
RUN <<EOF
110-
cat >> $(conan config home)/settings_user.yml <<EOT
111-
os:
112-
rhel-${RHEL_VERSION}:
113-
EOT
114-
EOF
115-
116103
# Explicitly set the compiler flags.
117104
RUN <<EOF
118105
cat >> $(conan config home)/global.conf <<EOT
@@ -134,9 +121,6 @@ EOF
134121
# ===================== CLANG IMAGE =====================
135122
FROM base AS clang
136123

137-
# This is not inherited from base image.
138-
ARG RHEL_VERSION
139-
140124
# Install Clang. Note that in the RHEL UBIs, we cannot choose the Clang version
141125
# to install and we get what is available. Some build dependencies require GCC
142126
# to be also available.
@@ -184,16 +168,6 @@ conan profile detect
184168
rm -rf /tmp/*
185169
EOF
186170

187-
# Add the distribution name and version, so they can be taken into account when
188-
# building dependencies. This requires setting the `os` field in the activated
189-
# profile where this image is used to the appropriate value.
190-
RUN <<EOF
191-
cat >> $(conan config home)/settings_user.yml <<EOT
192-
os:
193-
rhel-${RHEL_VERSION}:
194-
EOT
195-
EOF
196-
197171
# Explicitly set the compiler flags.
198172
RUN <<EOF
199173
cat >> $(conan config home)/global.conf <<EOT

docker/ubuntu/Dockerfile

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ RUN pipx install --pip-args='--no-cache' conan==${CONAN_VERSION} && \
5858
# ====================== GCC IMAGE ======================
5959
FROM base AS gcc
6060

61-
# These are not inherited from base image.
62-
ARG UBUNTU_VERSION
61+
# This is not inherited from the base image.
6362
ARG DEBIAN_FRONTEND=noninteractive
6463

6564
# Install GCC and create the necessary symlinks. We only support packaging with
@@ -119,16 +118,6 @@ conan profile detect
119118
rm -rf /tmp/*
120119
EOF
121120

122-
# Add the distribution name and version, so they can be taken into account when
123-
# building dependencies. This requires setting the `os` field in the activated
124-
# profile where this image is used to the appropriate value.
125-
RUN <<EOF
126-
cat >> $(conan config home)/settings_user.yml <<EOT
127-
os:
128-
ubuntu-${UBUNTU_VERSION}:
129-
EOT
130-
EOF
131-
132121
# Explicitly set the compiler flags.
133122
RUN <<EOF
134123
cat >> $(conan config home)/global.conf <<EOT
@@ -150,8 +139,7 @@ EOF
150139
# ===================== CLANG IMAGE =====================
151140
FROM base AS clang
152141

153-
# These are not inherited from base image.
154-
ARG UBUNTU_VERSION
142+
# This is not inherited from the base image.
155143
ARG DEBIAN_FRONTEND=noninteractive
156144

157145
# Install Clang. Some build dependencies require GCC to be also available.
@@ -211,16 +199,6 @@ conan profile detect
211199
rm -rf /tmp/*
212200
EOF
213201

214-
# Add the distribution name and version, so they can be taken into account when
215-
# building dependencies. This requires setting the `os` field in the activated
216-
# profile where this image is used to the appropriate value.
217-
RUN <<EOF
218-
cat >> $(conan config home)/settings_user.yml <<EOT
219-
os:
220-
ubuntu-${UBUNTU_VERSION}:
221-
EOT
222-
EOF
223-
224202
# Explicitly set the compiler flags.
225203
RUN <<EOF
226204
cat >> $(conan config home)/global.conf <<EOT

0 commit comments

Comments
 (0)