-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
66 lines (55 loc) · 1.56 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM debian:12.6 AS base
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
curl \
gnupg2 \
lsb-release \
software-properties-common \
build-essential \
wget \
git \
cmake \
pkg-config \
unzip \
libtool-bin \
gettext
FROM base AS neovim
COPY ./tools/neovim /build
WORKDIR /build
RUN make CMAKE_BUILD_TYPE=RelWithDebInfo
FROM base
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
postgresql-client \
rsync \
iputils-ping \
dnsutils \
traceroute \
telnet \
vim \
zsh \
redis-server # Has redis-cli
# Install kubectl
RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add && \
apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main" && \
apt-get update -y && \
apt-get install -y kubectl
COPY --from=neovim /build/build/bin/nvim /usr/bin/nvim
ARG USERNAME=elliotcourant
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& apt-get update \
&& apt-get install -y sudo wget \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
USER $USERNAME
COPY ./ /home/elliotcourant/dotfiles
RUN cd /home/elliotcourant/dotfiles && make install && cd -
WORKDIR /home/elliotcourant
ENTRYPOINT [ "/bin/zsh" ]
CMD ["-l"]