-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
51 lines (43 loc) · 1 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
FROM ubuntu:18.04
# Update && install common dependencies
ARG ZINIT_CONFIG
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update \
&& apt install -yq \
autoconf \
automake \
curl \
git \
golang-go \
htop \
locales \
make \
man \
ncurses-dev \
python \
subversion \
sudo \
telnet \
unzip \
vim \
zsh
# Set the locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Add user
RUN adduser --disabled-password --gecos '' user \
&& adduser user sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& usermod --shell /bin/zsh user
USER user
# Install zinit
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)"
# Copy configs into home directory
COPY --chown=user "${ZINIT_CONFIG}" /home/user/
RUN mv /home/user/zshrc /home/user/.zshrc
WORKDIR /home/user
ENTRYPOINT ["zsh"]
CMD ["-i", "-l"]