-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathDockerfile-ubuntu
48 lines (40 loc) · 1.53 KB
/
Dockerfile-ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
ARG UBUNTU_VERSION=16.04
FROM ubuntu:${UBUNTU_VERSION}
ARG FPM_VERSION=1.11.0
ARG PYTHON_VERSION=3
ARG DOCKER_WORKDIR=/usr/share/pdagent-integrations
ENV PYTHON_VERSION ${PYTHON_VERSION}
ENV container docker
ENV DEBIAN_FRONTEND noninteractive
ENV DOCKER_WORKDIR ${DOCKER_WORKDIR}
RUN apt-get update -y -qq
RUN apt-get install -y -q apt-utils
RUN apt-get install -y -q build-essential
RUN apt-get install -y -q ca-certificates
RUN apt-get install -y -q python-software-properties
RUN apt-get install -y -q ruby2.3
RUN apt-get install -y -q ruby2.3-dev
RUN apt-get install -y -q software-properties-common
RUN apt-get install -y -q sudo
RUN apt-get install -y -q systemd
RUN apt-get install -y -q bsdmainutils
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN update-ca-certificates
RUN gem install -q --no-ri --no-rdoc -v ${FPM_VERSION} fpm
RUN apt-get install -y -q python${PYTHON_VERSION}
RUN cd /lib/systemd/system/sysinit.target.wants/ \
&& ls | grep -v systemd-tmpfiles-setup | xargs rm -f $1
RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
/etc/systemd/system/*.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/basic.target.wants/* \
/lib/systemd/system/anaconda.target.wants/* \
/lib/systemd/system/plymouth* \
/lib/systemd/system/systemd-update-utmp*
VOLUME [ "/sys/fs/cgroup" ]
COPY . $DOCKER_WORKDIR
WORKDIR $DOCKER_WORKDIR
CMD ["/lib/systemd/systemd"]