forked from sjitech/ubuntu-with-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (41 loc) · 1.8 KB
/
Dockerfile
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
FROM ubuntu:bionic
RUN set -x && apt-get update && \
#
# remove this file otherwise man pages of later installed tools will not be istalled
#rm -f /etc/dpkg/dpkg.cfg.d/excludes && \
#apt-get -y install manpages-dev manpages-posix && \
# install all things of a normal ubuntu server.
(echo y; echo y; echo y; echo y) | unminimize && \
#
# install *.UTF-8 locales otherwise some apps get trouble
apt-get -y install locales && locale-gen en_US.UTF-8 ja_JP.UTF-8 zh_CN.UTF-8 && update-locale LANG=en_US.UTF-8 && \
#
# install other utilities
apt-get -y install \
apt-transport-https \
bash-completion vim less man jq bc \
lsof tree psmisc htop lshw sysstat dstat \
iproute2 iputils-ping iptables dnsutils traceroute \
netcat curl wget nmap socat netcat-openbsd rsync \
p7zip-full \
git tig \
binutils acl pv \
strace tcpdump \
&& \
#
# enable bash-completeion for root user (other users works by default)
(echo && echo '[ -f /etc/bash_completion ] && ! shopt -oq posix && . /etc/bash_completion') >> ~/.bashrc && \
#
# install sudo and create a sudoable user 'devuser'
apt-get -y install sudo && \
adduser --disabled-password --gecos "Developer" devuser && \
adduser devuser sudo && \
echo "devuser ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers && \
# generate .sudo_as_admin_successful to prevent sodu from showing guide message
touch ~devuser/.sudo_as_admin_successful && \
# allow devuser to install files to /usr/local without sudo prefix
chown -R root:sudo /usr/local
USER devuser
WORKDIR /home/devuser
# set LANG=*.UTF-8 so that default file encoding will be UTF-8, otherwise any non-ASCII files may have trouble.
ENV LANG=C.UTF-8