Skip to content

Commit

Permalink
ubuntu: Workaround to fix build for 18.04
Browse files Browse the repository at this point in the history
/usr/local/sbin/unminimize tries to install ubuntu-minimal &
ubuntu-standard which fail on unmet dependencies as it's pulling
systemd, etc.
  • Loading branch information
travier committed Sep 4, 2022
1 parent c2e2f0d commit 5cbaecd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ubuntu/18.04/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ RUN rm /etc/apt/apt.conf.d/docker-gzip-indexes /etc/apt/apt.conf.d/docker-no-lan
# adds it too late in the order) skips this step
RUN sed -Ei 's/^(hosts:.*)(\<files\>)\s*(.*)/\1\2 myhostname \3/' /etc/nsswitch.conf

# Restore documentation but do not upgrade all packages
# Install ubuntu-minimal & ubuntu-standard
# FIXME: Restore documentation but do not upgrade all packages
# Install extra packages as well as libnss-myhostname
# FIXME: Install ubuntu-minimal & ubuntu-standard
COPY extra-packages /
RUN sed -Ei '/apt-get (update|upgrade)/s/^/#/' /usr/local/sbin/unminimize && \
apt-get update && \
yes | /usr/local/sbin/unminimize && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
ubuntu-minimal ubuntu-standard \
libnss-myhostname \
$(cat extra-packages | xargs) && \
rm -rd /var/lib/apt/lists/*
Expand Down

0 comments on commit 5cbaecd

Please sign in to comment.