I'm attempting to build a container image based on ubuntu which has the docker engine installed on it. This is what I have in my dockerfile:
FROM ubuntu:trusty
MAINTAINER Ervin Varga
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get install -y openssh-server
RUN sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd
RUN mkdir -p /var/run/sshd
RUN apt-get -y install openjdk-7-jre
RUN apt-get -y install openjdk-7-jdk
RUN adduser --quiet jenkins
RUN echo "jenkins:jenkins" | chpasswd
RUN apt-get -y install apt-transport-https ca-certificates curl software-properties-common aufs-tools cgroup-lite git apparmor
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
RUN apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
RUN apt-get update
RUN apt-get -y install docker-engine
RUN sudo usermod -aG docker ${USER}
RUN su - ${USER}
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]`enter code here`
When I come to build the image I get:
The following packages have unmet dependencies:
docker-engine : Depends: init-system-helpers (>= 1.18~) but 1.14ubuntu1 is to be installed
Depends: lsb-base (>= 4.1+Debian11ubuntu7) but 4.1+Debian11ubuntu6.2 is to be installed
Depends: libdevmapper1.02.1 (>= 2:1.02.97) but 2:1.02.77-6ubuntu2 is to be installed
Depends: libltdl7 (>= 2.4.6) but it is not going to be installed
Depends: libsystemd0 but it is not installable
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt-get -y install docker-engine' returned a non-zero code: 100
can someone please steer me in the correct direction as to how I can resolve this.