forked from Zimbra/zm-base-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-devcore-ubuntu-20.04
31 lines (26 loc) · 1.11 KB
/
Dockerfile-devcore-ubuntu-20.04
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
# vi:ft=dockerfile
FROM ubuntu:20.04
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 ruby pkg-config libidn11-dev libwww-perl libz-dev libaio-dev libncurses-dev libexpat-dev libpcre3-dev libperl-dev libpopt-dev libbz2-dev libtest-simple-perl libsocket6-perl libtest-inter-perl libtest-warn-perl libtest-deep-perl debhelper
RUN apt-get -qq install -y build-essential
RUN apt-get -qq install -y openjdk-8-jdk ant ant-optional maven
# USERS
RUN groupadd -g 503 build
RUN echo "build:!!:16619:0:99999:7:::" >> /etc/shadow
RUN echo "build:x:503:503::/home/build:/bin/bash" >> /etc/passwd
RUN echo "build ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# REDUCE PRIVILEGE
USER build
WORKDIR /home/build
RUN sudo chown -R build:build /home/build/