Fixed docker permission issue #1014

This commit is contained in:
Mike Farah 2021-12-02 20:06:14 +11:00
parent 855b3c4b47
commit adb6144606
2 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,9 @@ WORKDIR /workdir
RUN set -eux; \
addgroup -g 1000 yq; \
adduser -u 1000 -G yq -s /bin/sh -h /home/yq -D yq
RUN chown -R yq:yq /workdir
USER yq
ENTRYPOINT ["/usr/bin/yq"]

5
scripts/test-docker.sh Executable file
View File

@ -0,0 +1,5 @@
#! /bin/bash
set -e
docker build . -t temp
docker run --rm -it --entrypoint sh temp -c 'touch a'