-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 765 Bytes
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 765 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
# Use Ubuntu as the base image
FROM ubuntu:latest
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y software-properties-common sudo
# Set the working directory in the container
WORKDIR /home/ubuntu
COPY ./scripts/install-packages.sh .
RUN ./install-packages.sh
# create ubuntu user
RUN useradd -m -s /bin/bash ubuntu
RUN echo "ubuntu:ubuntu" | chpasswd
RUN adduser ubuntu sudo
# Add user to root group
RUN usermod -aG root ubuntu
# Allow root group to create folders and files on /home
RUN chmod g+w /home
# Copy the current directory contents into the container at /home
COPY scripts/*.sh .
RUN chmod +x ./*.sh
# Run install-essential.sh script
RUN USER=ubuntu HOME=/home/ubuntu ./install-essential.sh
USER ubuntu
ENTRYPOINT [ "fish" ]