mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
Run as non-root local user
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y build-essential autoconf libtool
|
||||
|
||||
ARG USER=docker
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
RUN groupadd -g ${GID} docker && useradd -ms /bin/bash ${USER} -u ${UID} -g ${GID}
|
||||
|
||||
USER ${UID}:${GID}
|
@@ -1,5 +1,5 @@
|
||||
echo "Running with \"${@}\"..."
|
||||
docker build -t wolfssl . && \
|
||||
docker build -t wolfssl --build-arg UID=$(id -u) --build-arg GID=$(id -g) . && \
|
||||
docker run -it -v $(pwd)/..:/tmp/wolfssl -w /tmp/wolfssl wolfssl /bin/bash -c "./autogen.sh && ./configure $(echo ${@}) && make && ./testsuite/testsuite.test" && \
|
||||
docker run -it -v $(pwd)/..:/tmp/wolfssl -w /tmp/wolfssl wolfssl /bin/bash
|
||||
echo "Exited with error code $?"
|
||||
|
Reference in New Issue
Block a user