david/container-dev
Archived
1
0

updated all files

This commit is contained in:
david 2020-11-05 21:13:32 +01:00
parent 3611d3e5b8
commit efbc13a8e4
4 changed files with 15 additions and 10 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.swp
*~
.env

View File

@ -1,18 +1,23 @@
FROM ubuntu:focal
LABEL Description="This image is used to learn building dockerfiles" \
Author="david@socialnerds.org" \
Version="0.1" \
Version="rolling" \
License="MIT"
ENV USER_ID=1000
ENV GROUP_ID=1000
ENV USERNAME=david
ENV TIMEZONE=Europe/Vienna
VOLUME [ "/mnt" ]
VOLUME [ "/home/${USERNAME}" ]
RUN apt-get update && apt-get upgrade -y && \
groupadd -g $GROUP_ID container-dev && \
useradd -u $USER_ID -g $GROUP_ID -M -d /mnt -s /bin/false container-dev
RUN apt-get update && apt-get upgrade -y && apt-get install -y sudo vim git zsh curl wget iproute2 dnsutils && \
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
USER container-dev
USER $USERNAME
WORKDIR /home/$USERNAME
CMD top -b

View File

@ -1,4 +1,3 @@
# jekyll-dev
Simple container to learn building Dockerfiles.

View File

@ -5,6 +5,6 @@ services:
image: container-dev:latest
build: .
container_name: container-dev
environment:
- USER_ID=1000
- GROUP_ID=1000
volumes:
- /home/david:/home/david
restart: unless-stopped