52c13625d7
Update README Configurable user parameters Co-authored-by: Francesc Gordillo <yenien@posteo.net> Reviewed-on: http://gitea.hatthieves.es/manalejandro/docker-wahay/pulls/2
26 lines
1.1 KiB
Docker
26 lines
1.1 KiB
Docker
FROM golang
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
ARG UNAME=mumble
|
|
|
|
ENV UID=${UID} \
|
|
GID=${GID} \
|
|
UNAME=${UNAME}
|
|
|
|
RUN apt update && apt upgrade -y && apt install -y curl lsb-release dirmngr pulseaudio-utils && apt clean
|
|
RUN curl -s https://dl.autonomia.digital/debian/keys.asc | apt-key add -
|
|
RUN echo deb https://dl.autonomia.digital/debian $(lsb_release -c | cut -f 2) main | tee /etc/apt/sources.list.d/wahay.list
|
|
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
|
|
RUN apt update && apt install -y wahay && apt clean
|
|
RUN export UNAME=$UNAME UID=$UID GID=$GID && \
|
|
mkdir -p "/home/${UNAME}" && \
|
|
echo "${UNAME}:x:${UID}:${GID}:${UNAME} User,,,:/home/${UNAME}:/bin/bash" >> /etc/passwd && \
|
|
echo "${UNAME}:x:${UID}:" >> /etc/group && \
|
|
mkdir -p /etc/sudoers.d && \
|
|
echo "${UNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${UNAME} && \
|
|
chmod 0440 /etc/sudoers.d/${UNAME} && \
|
|
chown ${UID}:${GID} -R /home/${UNAME} && \
|
|
gpasswd -a ${UNAME} audio
|
|
USER ${UNAME}
|
|
ENTRYPOINT [ "wahay" ]
|