Browse Source

Fix Dockerfile

master
Apostolos Fanakis 5 years ago
parent
commit
c969f9f0ca
  1. 35
      jenkins/Dockerfile

35
jenkins/Dockerfile

@ -9,24 +9,23 @@ RUN mkdir /var/cache/jenkins
RUN chown -R jenkins:jenkins /var/log/jenkins RUN chown -R jenkins:jenkins /var/log/jenkins
RUN chown -R jenkins:jenkins /var/cache/jenkins RUN chown -R jenkins:jenkins /var/cache/jenkins
# Installs docker inside container # Installs docker inside image
# ATENTION: version MUST be the same as host's docker installation! RUN apt-get update && \
ARG HOST_DOCKER_VERSION apt-get install -y --no-install-recommends \
RUN apt update && apt install -y \ apt-transport-https \
apt-transport-https \ ca-certificates \
ca-certificates \ curl \
curl \ gnupg-agent \
gnupg-agent \ software-properties-common && \
software-properties-common curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - && \
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - add-apt-repository \
RUN sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/debian \
"deb [arch=amd64] https://download.docker.com/linux/debian \ $(lsb_release -cs) \
$(lsb_release -cs) \ stable" && \
stable" apt-get update && \
RUN apt update && apt install "docker-ce=$HOST_DOCKER_VERSION" "docker-ce-cli=$HOST_DOCKER_VERSION" apt-get install -y --no-install-recommends docker-ce && \
apt-get clean && \
# Installs tools needed when installing npm packages usermod -aG docker jenkins
RUN apt install -y build-essential
# Generates an SSH key-pair to use with Gitlab # Generates an SSH key-pair to use with Gitlab
# TODO: replace placeholder email (note that this is not really necessary) # TODO: replace placeholder email (note that this is not really necessary)

Loading…
Cancel
Save