-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (44 loc) · 1.25 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
46
47
48
49
50
51
52
FROM ubuntu:latest
MAINTAINER Vincent Chalnot <vincent.chalnot@gmail.com>
RUN ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime
ENV SSH_AUTH_SOCK /ssh-agent
ENV DEBIAN_FRONTEND noninteractive
ENV WWW_HOME /var/www
# Update APT and install base packages
RUN apt-get clean && \
apt-get update && \
apt-get install -y \
nano \
curl \
git \
wget \
sudo \
zsh \
locales \
apt-utils \
software-properties-common \
pv \
inetutils-ping \
iproute2
# Rebuild locales properly
RUN locale-gen en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
# Make default unix user id match www-data
RUN usermod -u ${USER_UID:-1000} www-data
# Allow shell access for www-data
RUN chsh -s /bin/zsh www-data
# Make www-data sudoer (without password)
RUN echo "www-data ALL=NOPASSWD: ALL" | (EDITOR="tee -a" visudo)
# Create home directory and set proper permissions
RUN mkdir -p $WWW_HOME
RUN chown www-data:${USER_GID:-1000} $WWW_HOME
# Copy entrypoint script
COPY entrypoint.sh /usr/bin/entrypoint.sh
USER www-data
RUN git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $WWW_HOME/.oh-my-zsh
COPY zshrc $WWW_HOME/.zshrc
WORKDIR $WWW_HOME
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
CMD ["zsh"]