You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.1 KiB

4 years ago
4 years ago
  1. FROM golang
  2. ARG UID=1000
  3. ARG GID=1000
  4. ARG UNAME=mumble
  5. ENV UID=${UID} \
  6. GID=${GID} \
  7. UNAME=${UNAME}
  8. RUN apt update && apt upgrade -y && apt install -y curl lsb-release dirmngr pulseaudio-utils && apt clean
  9. RUN curl -s https://dl.autonomia.digital/debian/keys.asc | apt-key add -
  10. RUN echo deb https://dl.autonomia.digital/debian $(lsb_release -c | cut -f 2) main | tee /etc/apt/sources.list.d/wahay.list
  11. RUN echo deb-src https://dl.autonomia.digital/debian $(lsb_release -c | cut -f 2) main | tee -a /etc/apt/sources.list.d/wahay.list
  12. RUN apt update && apt install -y wahay && apt clean
  13. RUN export UNAME=$UNAME UID=$UID GID=$GID && \
  14. mkdir -p "/home/${UNAME}" && \
  15. echo "${UNAME}:x:${UID}:${GID}:${UNAME} User,,,:/home/${UNAME}:/bin/bash" >> /etc/passwd && \
  16. echo "${UNAME}:x:${UID}:" >> /etc/group && \
  17. mkdir -p /etc/sudoers.d && \
  18. echo "${UNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${UNAME} && \
  19. chmod 0440 /etc/sudoers.d/${UNAME} && \
  20. chown ${UID}:${GID} -R /home/${UNAME} && \
  21. gpasswd -a ${UNAME} audio
  22. USER ${UNAME}
  23. ENTRYPOINT [ "wahay" ]