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

FROM ubuntu:focal
LABEL Description="This image is used to learn building dockerfiles" \
Author="david@socialnerds.org" \
Version="rolling" \
License="MIT"
ENV USER_ID=1000
ENV GROUP_ID=1000
ENV USERNAME=david
ENV TIMEZONE=Europe/Vienna
VOLUME [ "/home/${USERNAME}" ]
RUN apt-get update && apt-get upgrade -y && apt-get install -y sudo vim git zsh curl wget && \
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 && \
ln -fs /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && \
mkdir /Users && ln -s /home/david /Users/david && \
apt-get install -y iproute2 dnsutils iputils-ping
USER ${USERNAME}
WORKDIR /home/${USERNAME}
CMD top -b