updated all files
This commit is contained in:
parent
3611d3e5b8
commit
efbc13a8e4
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
*.swp
|
||||
*~
|
||||
.env
|
||||
|
17
Dockerfile
17
Dockerfile
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user