diff --git a/Dockerfile b/Dockerfile index 08f88bc4..797e3b98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/scripts/test-docker.sh b/scripts/test-docker.sh new file mode 100755 index 00000000..427233cb --- /dev/null +++ b/scripts/test-docker.sh @@ -0,0 +1,5 @@ +#! /bin/bash +set -e + +docker build . -t temp +docker run --rm -it --entrypoint sh temp -c 'touch a'