Configurable user parameters
This commit is contained in:
parent
007167f4cb
commit
ffafa8218b
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.env
|
@ -1,8 +1,14 @@
|
||||
version: "2"
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
wahay:
|
||||
build: ./wahay
|
||||
build:
|
||||
dockerfile: ./wahay/Dockerfile
|
||||
context: .
|
||||
args:
|
||||
UID: ${UID:-1000}
|
||||
GID: ${GID:-1000}
|
||||
UNAME: ${UNAME:-mumble}
|
||||
hostname: wahay
|
||||
container_name: wahay
|
||||
environment:
|
||||
|
@ -1,11 +1,18 @@
|
||||
FROM golang
|
||||
ENV UNAME mumble
|
||||
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=1000 GID=1000 && \
|
||||
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 && \
|
||||
@ -15,4 +22,4 @@ RUN export UNAME=$UNAME UID=1000 GID=1000 && \
|
||||
chown ${UID}:${GID} -R /home/${UNAME} && \
|
||||
gpasswd -a ${UNAME} audio
|
||||
USER ${UNAME}
|
||||
ENTRYPOINT [ "wahay" ]
|
||||
ENTRYPOINT [ "wahay" ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user