1
0
Fork 0

Add Ubuntu desktop base

main
Ambrose Chua 2021-05-06 17:53:44 +08:00
parent 04b3db381c
commit 00e3c2d8b7
2 changed files with 36 additions and 1 deletions

View File

@ -30,6 +30,6 @@ LABEL org.opencontainers.image.url="https://github.com/serverwentdown/env"
LABEL org.opencontainers.image.source="https://github.com/serverwentdown/env.git"
LABEL org.opencontainers.image.authors="Ambrose Chua"
CMD ["/bin/zsh", "-l"]
CMD ["/bin/true"]
# vim: set ft=dockerfile:

View File

@ -0,0 +1,35 @@
FROM ubuntu:20.10
RUN apt-get update \
&& apt-get install -y \
sudo zsh \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -s /bin/zsh ambrose \
&& echo '' >> /etc/sudoers \
&& echo '## No password sudo' >> /etc/sudoers \
&& echo 'ambrose ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
WORKDIR /home/ambrose
COPY --chown=ambrose:ambrose . .
RUN chown ambrose:ambrose /home/ambrose \
&& chmod go-rwx .gnupg
# Potential XDG_RUNTIME_DIR
ENV XDG_RUNTIME_DIR=/run/container
RUN mkdir -p /run/container \
&& chown ambrose:ambrose /run/container \
&& chmod 700 /run/container
USER ambrose
RUN ./.config/yadm/bootstrap rootzsh nobase nonicetohave desktopbase
LABEL org.opencontainers.image.title="environment"
LABEL org.opencontainers.image.url="https://github.com/serverwentdown/env"
LABEL org.opencontainers.image.source="https://github.com/serverwentdown/env.git"
LABEL org.opencontainers.image.authors="Ambrose Chua"
CMD ["/bin/true"]
# vim: set ft=dockerfile: