-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@l0b0 , looks ok except one thing I asked to reconsider. Thanks
@@ -1,19 +1,26 @@ | |||
FROM ubuntu:20.04 as build | |||
|
|||
RUN apt-get update \ | |||
&& apt-get install -y curl python3-pip \ | |||
&& apt-get install --assume-yes --no-install-recommends curl=7.68.0-1ubuntu2.4 python3-pip=20.0.2-5ubuntu1.1 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apt package versions as above
@@ -1,6 +1,8 @@ | |||
FROM ubuntu:20.04 | |||
ENV DEBIAN_FRONTEND noninteractive | |||
RUN apt update && apt install -y python3 && rm -rf /var/lib/apt/lists/* | |||
RUN apt-get update \ | |||
&& apt-get install --assume-yes --no-install-recommends python3=3.8.2-0ubuntu2 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@l0b0 , are you sure we need to specify apt packages versions here ? The only distribution upgrades are bug fixes. I think this is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pro locking versions:
- Makes it less likely to break things arbitrarily. Even OS package patches sometimes sneak in functional changes which impact systems. Reproducibility is a huge win.
Cons:
- Even if we install fixed versions of the top level packages, we might get updated versions of their dependencies. Apt AFAIK does not have a lockfile mechanism like NPM and Poetry, meaning that locking all the package dependencies is a bit more of a chore.
- Dependabot does not yet patch Dockerfile package installs.
Once Dependabot supports apt-get
within Dockerfiles that fixes both of the above - we could just lock the package dependencies in the apt-get
command once and Dependabot would take care of keeping them up to date. So on balance I agree for now. Documented.
|
||
|
||
FROM ubuntu:20.04 | ||
|
||
ENTRYPOINT ["/opt/.venv/bin/python", "/opt/task.py"] | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN apt-get update && apt-get install -y python3 && rm -rf /var/lib/apt/lists/* | ||
RUN apt-get update \ | ||
&& apt-get install --assume-yes --no-install-recommends python3=3.8.2-0ubuntu2 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apt package versions as above
Ignore rule to force setting specific package versions since - Ubuntu should only be receiving non-breaking patches, - we don't want the overhead of having to follow up on every package upgrade manually (see dependabot/dependabot-core#2129), and - locking only the top level packages means we'd still get arbitrary versions of their dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @l0b0
No description provided.