Skip to content

Commit 907095d

Browse files
committed
docker: Remove VTD configuration and drop support for Ubuntu 16.04
1 parent cd20202 commit 907095d

7 files changed

+47
-406
lines changed

dist/docker/Dockerfile.archlinux

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# syntax = docker/dockerfile:1.2
1+
# syntax = docker/dockerfile:1.4.3
22
# Dockerfile.archlinux
33
#
4-
# See Dockerfile.jammy for documentation of each of the lines.
5-
ARG VTD_IMAGE=scratch
6-
FROM ${VTD_IMAGE} AS vtd
7-
WORKDIR /vtd
8-
4+
# See Dockerfile.ubuntu for documentation of each of the lines.
95
FROM archlinux:latest
106

117
# Install System Packages
@@ -39,7 +35,6 @@ RUN make -f /cloe/Makefile.setup setup-conan && \
3935

4036
# Build and Install Cloe
4137
WORKDIR /cloe
42-
ARG WITH_VTD=0
4338
ARG KEEP_SOURCES=0
4439

4540
# Download or build dependencies:
@@ -51,7 +46,7 @@ RUN --mount=type=cache,target=/ccache \
5146
--mount=type=secret,target=/root/setup.sh,id=setup,mode=0400 \
5247
--mount=type=bind,target=/root/.conan/data/vtd,source=/vtd,from=vtd,rw \
5348
if [ -r /root/setup.sh ]; then . /root/setup.sh; fi && \
54-
make -f Makefile.all WITH_VTD=${WITH_VTD} ${VENDOR_TARGET} && \
49+
make -f Makefile.all ${VENDOR_TARGET} && \
5550
# Clean up:
5651
conan user --clean && \
5752
if [ ${KEEP_SOURCES} -eq 0 ]; then \
@@ -69,7 +64,7 @@ RUN --mount=type=cache,target=/ccache \
6964
--mount=type=secret,target=/root/setup.sh,id=setup,mode=0400 \
7065
if [ -r /root/setup.sh ]; then . /root/setup.sh; fi && \
7166
echo "${PROJECT_VERSION}" > /cloe/VERSION && \
72-
make WITH_VTD=${WITH_VTD} ${PACKAGE_TARGET} && \
67+
make ${PACKAGE_TARGET} && \
7368
# Clean up:
7469
conan user --clean && \
7570
if [ ${KEEP_SOURCES} -eq 0 ]; then \
@@ -83,5 +78,5 @@ RUN --mount=type=cache,target=/ccache \
8378
RUN --mount=type=secret,target=/root/setup.sh,id=setup,mode=0400 \
8479
--mount=type=bind,target=/root/.conan/data/vtd,source=/vtd,from=vtd,rw \
8580
if [ -r /root/setup.sh ]; then . /root/setup.sh; fi && \
86-
make WITH_VTD=${WITH_VTD} smoketest && \
81+
make smoketest && \
8782
conan user --clean

dist/docker/Dockerfile.bionic

-93
This file was deleted.

dist/docker/Dockerfile.focal

-90
This file was deleted.

dist/docker/Dockerfile.jammy renamed to dist/docker/Dockerfile.ubuntu

+16-24
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
1-
# syntax = docker/dockerfile:1.2
2-
# Dockerfile.jammy
1+
# syntax = docker/dockerfile:1.4.3
2+
# Dockerfile.ubuntu
33
#
44
# This file acts partly as a Docker recipe for building Cloe on Ubuntu.
5+
# It is known to work with Ubuntu 18.04, 20.04, and 22.04.
56
#
67
# If you are behind a proxy, make sure to pass in the respective HTTP_PROXY,
78
# HTTPS_PROXY, and NO_PROXY variables.
8-
9-
# This is a work-around to not being able to use variables in RUN --mount=from:
10-
# If you want to use VTD in this image, you need to specify the Docker image
11-
# containing the distribution that can be mounted at /root/.conan/data/
12-
ARG VTD_IMAGE=scratch
13-
FROM ${VTD_IMAGE} AS vtd
14-
WORKDIR /vtd
15-
16-
FROM ubuntu:22.04
9+
ARG UBUNTU_VERSION=20.04
10+
FROM ubuntu:${UBUNTU_VERSION}
1711

1812
# Install System Packages
1913
#
2014
# These packages are required for building and testing Cloe.
2115
COPY Makefile.help /cloe/Makefile.help
2216
COPY Makefile.setup /cloe/Makefile.setup
23-
RUN --mount=type=cache,id=focal-cache,target=/var/cache/apt \
24-
--mount=type=cache,id=focal-lib,target=/var/lib/apt \
17+
RUN --mount=type=cache,id=ubuntu-${UBUNTU_VERSION}-cache,target=/var/cache/apt \
18+
--mount=type=cache,id=ubuntu-${UBUNTU_VERSION}-lib,target=/var/lib/apt \
2519
apt-get update && \
26-
apt-get install -y make ccache locales && \
20+
apt-get install -y make ccache locales libbsd0 && \
2721
make -f /cloe/Makefile.setup \
2822
DEBIAN_FRONTEND=noninteractive \
2923
APT_ARGS="--no-install-recommends -y" \
30-
install-system-deps \
31-
&& \
24+
install-system-deps && \
3225
locale-gen && \
3326
rm -rf /var/lib/apt/lists/*
3427

@@ -45,8 +38,10 @@ RUN pip3 install --upgrade pip && \
4538
# Install and Setup Conan
4639
#
4740
# You may not want to use the default Conan remote (conan-center), so we use
48-
# whatever is stored in the build arguments CONAN_REMOTE. Currently, only
49-
# anonymous access is possible in this Dockerfile.
41+
# whatever is stored in the build arguments CONAN_REMOTE.
42+
#
43+
# If you need to login to a Conan remote, make use of the setup.sh file, which
44+
# will be sourced for every run argument that uses the conan command.
5045
#
5146
# The following profiles are available: default, cloe-release, cloe-debug
5247
COPY dist/conan /cloe/dist/conan
@@ -62,7 +57,6 @@ RUN make -f /cloe/Makefile.setup setup-conan && \
6257
# Makefile at the root of the repository. This also acts as a form of
6358
# documentation.
6459
WORKDIR /cloe
65-
ARG WITH_VTD=0
6660
ARG KEEP_SOURCES=0
6761

6862
# Download or build dependencies:
@@ -72,9 +66,8 @@ COPY Makefile.all /cloe
7266
ARG VENDOR_TARGET="export-vendor download-vendor"
7367
RUN --mount=type=cache,target=/ccache \
7468
--mount=type=secret,target=/root/setup.sh,id=setup,mode=0400 \
75-
--mount=type=bind,target=/root/.conan/data/vtd,source=/vtd,from=vtd,rw \
7669
if [ -r /root/setup.sh ]; then . /root/setup.sh; fi && \
77-
make -f Makefile.all WITH_VTD=${WITH_VTD} ${VENDOR_TARGET} && \
70+
make -f Makefile.all ${VENDOR_TARGET} && \
7871
# Clean up:
7972
conan user --clean && \
8073
if [ ${KEEP_SOURCES} -eq 0 ]; then \
@@ -92,7 +85,7 @@ RUN --mount=type=cache,target=/ccache \
9285
--mount=type=secret,target=/root/setup.sh,id=setup,mode=0400 \
9386
if [ -r /root/setup.sh ]; then . /root/setup.sh; fi && \
9487
echo "${PROJECT_VERSION}" > /cloe/VERSION && \
95-
make WITH_VTD=${WITH_VTD} ${PACKAGE_TARGET} && \
88+
make ${PACKAGE_TARGET} && \
9689
# Clean up:
9790
conan user --clean && \
9891
if [ ${KEEP_SOURCES} -eq 0 ]; then \
@@ -104,7 +97,6 @@ RUN --mount=type=cache,target=/ccache \
10497

10598
# Run smoketests.
10699
RUN --mount=type=secret,target=/root/setup.sh,id=setup,mode=0400 \
107-
--mount=type=bind,target=/root/.conan/data/vtd,source=/vtd,from=vtd,rw \
108100
if [ -r /root/setup.sh ]; then . /root/setup.sh; fi && \
109-
make WITH_VTD=${WITH_VTD} smoketest && \
101+
make smoketest && \
110102
conan user --clean

0 commit comments

Comments
 (0)