-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (32 loc) · 1008 Bytes
/
Dockerfile
File metadata and controls
36 lines (32 loc) · 1008 Bytes
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
# Pull from fedora:latest
FROM fedora:latest
# Upgrade and install essential packages
RUN dnf upgrade -y;dnf install -y \
sudo \
ncurses \
cracklib \
cracklib-dicts \
iputils \
iproute \
curl \
neovim \
git \
gh \
openssh-server \
openssh-clients
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Create system user and add to wheel group
RUN useradd -m -s /bin/bash monke
RUN usermod -aG wheel monke
RUN passwd -d monke
# Entry point for code-server
COPY entrypoint /home/monke/.config/entrypoint
RUN echo -e "\nalias backup=\"git add .;git commit -m 'Backup +$(date +\"%Y:%m:%d %H:%M:%S\");git push'\"\n\n# REMOVE IF YOU CHANGED THE PASSWORD\necho -e 'IMPORTANT: Please change your password via 'passwd' command\n(Change .bashrc to remove this prompt)'" >> /home/monke/.bashrc
RUN mkdir /home/monke/workspaces
RUN chown -R monke:monke /home/monke
# Expose ports and set user
EXPOSE 8080 8443
USER monke
WORKDIR /home/monke
# Start code-server
CMD ["/bin/bash", "/home/monke/.config/entrypoint"]