From adb406e1eebf05e452afca98fa9bf3ccd7abcfca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Fekete?= Date: Wed, 4 Jan 2023 11:48:24 -0500 Subject: [PATCH] Adding some developer utilities (#5941) * Adding some developer utilities for Docker. * Add support for `make test` * Don't need to run the testsuite specifically * Share .gitconfig and ssh keys with the container Co-authored-by: Andras Fekete --- Docker/Dockerfile | 2 +- Docker/run.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 36cc30535..b55ba7964 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -1,7 +1,7 @@ ARG DOCKER_BASE_IMAGE=ubuntu:22.04 FROM $DOCKER_BASE_IMAGE -RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y build-essential autoconf libtool +RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y build-essential autoconf libtool git gdb iputils-ping ARG USER=docker ARG UID=1000 diff --git a/Docker/run.sh b/Docker/run.sh index b2ad6e8d0..30871c675 100755 --- a/Docker/run.sh +++ b/Docker/run.sh @@ -6,8 +6,8 @@ echo "Running with \"${*}\"..." WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/..; pwd) docker build -t wolfssl --build-arg UID=$(id -u) --build-arg GID=$(id -g) "${WOLFSSL_DIR}/Docker" && \ - docker run -it -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl /bin/bash -c "./autogen.sh && ./configure ${*@Q} && make && ./testsuite/testsuite.test" && \ - docker run -it -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl /bin/bash + docker run -it -v ${HOME}/.gitconfig:/home/docker/.gitconfig:ro -v ${HOME}/.ssh:/home/docker/.ssh:ro -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl /bin/bash -c "./autogen.sh && ./configure ${*@Q} && make" && \ + docker run -it -v ${HOME}/.gitconfig:/home/docker/.gitconfig:ro -v ${HOME}/.ssh:/home/docker/.ssh:ro -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl /bin/bash exitval=$? echo "Exited with error code $exitval"