
Unfortunately we have to modify base image for such kind of tasks to retain permissions structure. Change-Id: Ib4b3ea4da7c1f641b9ab0223226348de5eac94df
29 lines
1.0 KiB
Django/Jinja
29 lines
1.0 KiB
Django/Jinja
FROM {{ base_distro }}:{{ base_tag }}
|
|
MAINTAINER {{ maintainer }}
|
|
|
|
# This will prevent questions from being asked during the install
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y apt-transport-https
|
|
COPY {{ render('sources.list.debian.j2') }} /etc/apt/sources.list
|
|
COPY apt_conf_retries /etc/apt/apt.conf.d/99retries
|
|
|
|
RUN apt-get update \
|
|
&& apt-get upgrade -y \
|
|
&& apt-get dist-upgrade -y \
|
|
&& apt-get install -y --no-install-recommends ca-certificates curl sudo openssl python \
|
|
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
|
&& python get-pip.py \
|
|
&& rm get-pip.py \
|
|
&& apt-get clean
|
|
|
|
COPY sudoers /etc/sudoers
|
|
RUN chmod 440 /etc/sudoers \
|
|
&& groupadd microservices
|
|
|
|
# Directories to store additional bin and configs needed for bootstrapping of the containers.
|
|
# https://github.com/docker/docker/issues/13011
|
|
RUN mkdir -p /opt/ccp/etc /opt/ccp/bin /opt/ccp/etc/tls \
|
|
&& chown -R root:microservices /opt/ccp \
|
|
&& chmod -R g+wrx /opt/ccp
|