david/container-dev
david
/
container-dev
Archived
1
0
Fork 0
This repository has been archived on 2023-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
container-dev/Dockerfile

26 lines
819 B
Docker
Raw Normal View History

2020-10-28 15:19:02 +01:00
FROM ubuntu:focal
LABEL Description="This image is used to learn building dockerfiles" \
Author="david@socialnerds.org" \
2020-11-05 21:13:32 +01:00
Version="rolling" \
2020-10-28 15:19:02 +01:00
License="MIT"
ENV USER_ID=1000
ENV GROUP_ID=1000
2020-11-05 21:13:32 +01:00
ENV USERNAME=david
ENV TIMEZONE=Europe/Vienna
2020-10-28 15:19:02 +01:00
2020-11-05 21:13:32 +01:00
VOLUME [ "/home/${USERNAME}" ]
2020-10-28 19:09:24 +01:00
2020-11-05 23:21:18 +01:00
RUN apt-get update && apt-get upgrade -y && apt-get install -y sudo vim git zsh curl wget && \
2020-11-05 21:13:32 +01:00
groupadd -g ${GROUP_ID} ${USERNAME} && \
useradd -u ${USER_ID} -g ${GROUP_ID} -M -d /home/${USERNAME} -s /bin/zsh ${USERNAME} && \
echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
2020-11-05 23:21:18 +01:00
ln -fs /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && \
2020-11-07 21:18:10 +01:00
mkdir /Users && ln -s /home/david /Users/david && \
2020-11-05 23:21:18 +01:00
apt-get install -y iproute2 dnsutils iputils-ping
2020-10-28 19:09:24 +01:00
2020-11-05 23:08:03 +01:00
USER ${USERNAME}
WORKDIR /home/${USERNAME}
2020-10-28 15:19:02 +01:00
CMD top -b