forked from Zimbra/zm-base-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-devcore-docker
36 lines (31 loc) · 1.24 KB
/
Dockerfile-devcore-docker
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
# vi:ft=dockerfile
FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractive
# SYSTEM
RUN apt-get -qq update
RUN apt-get -qq dist-upgrade -y
RUN apt-get -qq autoremove -y
RUN apt-get -qq install -y apt-utils
RUN apt-get -qq install -y ca-certificates tzdata
RUN apt-get -qq install -y curl wget
RUN apt-get -qq install -y software-properties-common
RUN apt-get -qq install -y apt-transport-https
RUN apt-get -qq install -y sudo
# ENVIRONMENT
RUN apt-get -qq install -y git perl
RUN apt-get -qq install -y openssl
RUN apt-get -qq install -y make
#RUN apt-get -qq install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
RUN echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
RUN apt-get -qq update
RUN apt-get -qq install docker-ce
RUN curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
RUN chmod +x /usr/local/bin/docker-compose
# USERS
RUN useradd -ms /bin/bash -G sudo build
RUN usermod -aG docker build
RUN sed -i -e '/^%sudo/s/)\s*ALL$/) NOPASSWD: ALL/' /etc/sudoers
# REDUCE PRIVILEGE
USER build
WORKDIR /home/build