-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (24 loc) · 790 Bytes
/
Dockerfile
File metadata and controls
35 lines (24 loc) · 790 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
FROM ubuntu:24.04
LABEL org.opencontainers.image.authors="Magnus Strandgaard"
# Set non-interactive mode for apt
# ENV DEBIAN_FRONTEND=noninteractive
# OS updates and install
RUN apt-get -qq update
RUN apt-get install git sudo zsh -qq -y
RUN apt-get update && sudo apt-get install make curl stow vim wget unzip -y
# Create test user and add to sudoers
RUN useradd -m -s /bin/zsh magstr && \
usermod -aG sudo magstr && \
echo "magstr ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
# Add dotfiles and chown
COPY . /home/magstr/dotfiles
RUN chown -R magstr:magstr /home/magstr
# Switch to testuser
USER magstr
# Set HOME explicitly
ENV HOME=/home/magstr
# Change working directory
WORKDIR /home/magstr/dotfiles
# Optionally run setup if needed
# RUN ./setup
CMD ["/bin/bash"]