Closed bethesque closed 5 years ago
Looking into this as part of https://github.com/DiUS/pact_broker-docker/issues/52. Upgrading the OS packages especially security updates would be advisable but uncompressed image sizes tend to hit 1.0Gb to 1.1Gb for ubuntu systems.
The OS update is already happening in the docker file.
RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold"
The base image currently is at 18.04.01
https://github.com/phusion/baseimage-docker/pull/488
The following command will upgrade the OS to 18.04.02 but leaves the image at over 1gb.
apt-get upgrade -y -o Dpkg::Options::="--force-confold
Without the forced upgrade, the image is not much bigger, uncompressed that the base image it is built upon.
We can look to clean up after the upgrade, which should bring the size down. 👍
@YOU54F I got that update line from the passenger docker docs. Perhaps you could suggest your improved line so that other people don't have the same problem? A PR for this section would be handy: https://github.com/phusion/passenger-docker#upgrading-the-operating-system-inside-the-container
Have done mate, nice one 👌
From https://github.com/phusion/passenger-docker#upgrading-the-operating-system-inside-the-container
Upgrading the operating system inside the container
passenger-docker images contain an Ubuntu 16.04 operating system. You may want to update this OS from time to time, for example to pull in the latest security updates. OpenSSL is a notorious example. Vulnerabilities are discovered in OpenSSL on a regular basis, so you should keep OpenSSL up-to-date as much as you can.
While we release passenger-docker images with the latest OS updates from time to time, you do not have to rely on us. You can update the OS inside passenger-docker images yourself, and it is recommend that you do this instead of waiting for us.
To upgrade the OS in the image, run this in your Dockerfile:
RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold"