fix some docker permissions

This commit is contained in:
idk
2022-09-29 00:46:49 -04:00
parent b6122bd7e6
commit 5995674c9e
2 changed files with 6 additions and 3 deletions

View File

@ -1,9 +1,12 @@
FROM golang
ADD . /usr/src/about.i2p
WORKDIR /usr/src/about.i2p
RUN adduser --home /home/user --gecos "user,,,," --disabled-password user
RUN adduser --home /home/user --gecos "user,,,," --disabled-password user && \
mkdir -p /home/user/about.i2p && \
chown -r user /home/user/about.i2p
RUN git clone https://github.com/eyedeekay/cerca ../../cblgh/cerca && \
go build && \
cp about.i2p /usr/bin/about.i2p
WORKDIR /home/user/about.i2p
USER user
WORKDIR
CMD about.i2p

View File

@ -5,4 +5,4 @@ wd=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
. "${wd}/env.sh"
docker build -t eyedeekay/about.i2p .
docker rm -f about.i2p
docker run -d --net=host --restart=always --name=about.i2p --volume="${HOME}/abouti2p":/home/user/about.i2p eyedeekay/about.i2p about.i2p --authkey="${AUTH_KEY}"
docker run -d --net=host --restart=always --user=user --name=about.i2p --volume="${HOME}/abouti2p":/home/user/about.i2p eyedeekay/about.i2p about.i2p --authkey="${AUTH_KEY}"