-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.ubuntu
67 lines (51 loc) · 1.89 KB
/
Dockerfile.ubuntu
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
67
FROM ubuntu:latest
ENV USER cmiranda
ENV PASSWORD cmiranda
ENV DOTFILES_HOME /home/cmiranda/workspace
# Required for lolcat to work
ENV PATH /usr/games/:$PATH
# Avoids command line interactions
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install sudo
RUN apt-get install -y \
git \
curl \
python3 \
python3-pip \
python3-venv \
software-properties-common \
unzip \
wget \
rsync \
zsh
# Create and activate a virtual environment
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Install packages within the virtual environment
RUN pip install pyyaml
RUN groupadd --gid 5000 $USER \
&& useradd \
--home-dir /home/$USER \
--create-home --uid 5000 \
--gid 5000 --shell /bin/sh \
--skel /dev/null $USER \
&& usermod -aG sudo $USER
RUN echo "$USER:$PASSWORD" | chpasswd
RUN mkdir -p $DOTFILES_HOME/dotfiles
ADD . $DOTFILES_HOME/dotfiles/.
RUN chmod -R 775 $DOTFILES_HOME
RUN chown -R $USER:$USER $DOTFILES_HOME
USER $USER
WORKDIR $DOTFILES_HOME/dotfiles
# Mocking secrets
# These will be provided by git-secret after revealing secrets
RUN /bin/bash scripts/tests/mock-secrets.sh $DOTFILES_HOME/dotfiles
# Link if doesn't exist (Fuck GitHub Actions)
RUN ln -s $DOTFILES_HOME/dotfiles /home/cmiranda/dotfiles
RUN ln -s $DOTFILES_HOME/dotfiles/fzf /home/cmiranda/fzf
#RUN /bin/bash scripts/sync.sh
#CMD ["/usr/bin/bash"]
# Keep the container running
CMD tail -f /dev/null