Configurable user parameters (#2)
Update README Configurable user parameters Co-authored-by: Francesc Gordillo <yenien@posteo.net> Reviewed-on: http://gitea.hatthieves.es/manalejandro/docker-wahay/pulls/2
This commit is contained in:
parent
007167f4cb
commit
52c13625d7
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.env
|
10
README.md
10
README.md
@ -9,9 +9,11 @@ Needs `docker` and `docker-compose`
|
||||
xhost +"local:docker@"
|
||||
```
|
||||
|
||||
### Change your local user UID in the next line of `docker-compose.yml` for pulseaudio (default 1000)
|
||||
```
|
||||
- /run/user/[UID]/pulse:/run/user/1000/pulse
|
||||
### Add your local user UID and GID in the `.env` file:
|
||||
|
||||
```bash
|
||||
echo "UID=${UID}" > .env
|
||||
echo "GID=${UID}" >> .env
|
||||
```
|
||||
|
||||
### Execute with compose
|
||||
@ -21,4 +23,4 @@ docker-compose up -d
|
||||
|
||||
### License
|
||||
|
||||
MIT
|
||||
MIT
|
||||
|
@ -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:
|
||||
@ -10,5 +16,5 @@ services:
|
||||
- PULSE_SERVER=unix:/run/user/1000/pulse/native
|
||||
volumes:
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix:ro
|
||||
- /run/user/1000/pulse:/run/user/1000/pulse
|
||||
- /run/user/${UID:-1000}/pulse:/run/user/${UID:-1000}/pulse
|
||||
- ./wahay/pulseaudio.client.conf:/etc/pulse/client.conf:ro
|
||||
|
@ -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…
Reference in New Issue
Block a user