Skip to content

Commit

Permalink
running rootless (#16)
Browse files Browse the repository at this point in the history
* running rootless

* rootless
  • Loading branch information
roi-codefresh authored Mar 26, 2023
1 parent c9043b9 commit facd0a3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
21 changes: 17 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,23 @@ RUN apk add --update curl bash coreutils \
&& curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl -o /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl

ADD bin /bin
ADD monitor /monitor
ADD dind-metrics /dind-metrics
ADD local-volumes /local-volumes
# add user
RUN addgroup --gid 1000 dind-volume-utils && \
adduser --uid 1000 --gecos "" --disabled-password \
--ingroup dind-volume-utils \
--home /home/dind-volume-utils \
--shell /bin/bash dind-volume-utils

WORKDIR /home/dind-volume-utils

ADD bin ./bin
ADD monitor ./monitor
ADD dind-metrics ./dind-metrics
ADD local-volumes ./local-volumes

RUN chown -R dind-volume-utils:dind-volume-utils /home/dind-volume-utils && \
chmod 755 /home/dind-volume-utils

USER dind-volume-utils:dind-volume-utils

CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion service.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 1.29.2
version: 1.29.3

0 comments on commit facd0a3

Please sign in to comment.