Skip to content
Snippets Groups Projects
Commit 9ffc0958 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

Dockerfile: facilitate the use of unprivileged container

Based on work by Pierre-Olivier Mercier <nemunaire@nemunai.re>

closes #783
parent 5fef6e8f
No related merge requests found
Pipeline #94115 failed with stages
in 28 minutes and 25 seconds
......@@ -71,11 +71,14 @@ ENV RUNTIME_PKGS \
# Copy artifacts
COPY --from=0 /tmp/knot-install/ /
# Install dependencies
# Install dependencies and create knot user and group
ARG UID=53
RUN apt-get update && \
apt-get install -yqq ${RUNTIME_PKGS} && \
rm -rf /var/lib/apt/lists/* && \
ldconfig
ldconfig && \
adduser --quiet --system --group --no-create-home --home /storage --uid=${UID} knot && \
chown knot:knot /config /rundir /storage
# Expose port
EXPOSE 53/UDP
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment