Commit abd315fe authored by Jonathan Dowland's avatar Jonathan Dowland
Browse files

security archives for images.

If the image being built is jessie or stretch, add security apt sources.

I considered moving to using 'stable', 'testing' all over the place
instead of the code-names, but this would have the undesired effect
of changing releases automatically when the code names roll over.

I looked for a way of mapping testing->stretch etc in a more future
proof fashion but came up short. /etc/debian_version is not useful
for this.

Closes: #9, #10.
parent 17507b7e
FROM scratch
MAINTAINER Jonathan Dowland <jmtd@debian.org>
ADD root.tar /
# Unfortunately we have to use codenames here rather than something more
# static (stable/testing) because we wouldn't want the images to suddenly
# change suite when a new Debian release was made. Thus these greps will
# need to be updated to track the current release codenames
RUN if grep -q jessie /etc/apt/sources.list; then \
echo "deb http://security.debian.org jessie/updates main contrib non-free" \
>> /etc/apt/sources.list; \
elif grep -q stretch /etc/apt/sources.list; then \
echo "deb http://security.debian.org stretch/updates main contrib non-free" \
>> /etc/apt/sources.list; \
fi
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y autoremove \
&& apt-get clean \
&& find /var/lib/apt/lists -type f -delete
LABEL org.redmars.docker.VcsType git
LABEL org.redmars.docker.VcsUrl http://github.com/jmtd/debian-docker
LABEL org.redmars.docker.VcsRef SUBSTITUTION_FAILED
CMD ["/bin/bash"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment