This commit is contained in:
Hannes Fuchs 2023-05-04 07:46:01 -07:00 committed by GitHub
commit 59afd67c17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,8 @@
FROM debian:bullseye-slim
ARG DUID=1000
ARG DGID=1000
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
@ -29,7 +32,7 @@ RUN mkdir /tmp/ec &&\
mv bin/ec-linux-amd64 /usr/local/bin/editorconfig-checker &&\
rm -rf /tmp/ec
RUN useradd -d /gluon gluon
RUN groupadd -g $DGID gluon && useradd -g $DGID -u $DUID -d /gluon gluon
USER gluon
VOLUME /gluon

View File

@ -11,11 +11,11 @@ TAG="gluon:${BRANCH:-latest}"
if [ "$(command -v podman)" ]
then
podman build -t "${TAG}" contrib/docker
podman build --build-arg DGID="$(id -g)" --build-arg DUID="$(id -u)" -t "${TAG}" contrib/docker
podman run -it --rm --userns=keep-id --volume="$(pwd):/gluon" "${TAG}"
elif [ "$(command -v docker)" ]
then
docker build -t "${TAG}" contrib/docker
docker build --build-arg DGID="$(id -g)" --build-arg DUID="$(id -u)" -t "${TAG}" contrib/docker
docker run -it --rm --volume="$(pwd):/gluon" "${TAG}"
else
1>&2 echo "Please install either podman or docker. Exiting" >/dev/null