diff --git a/dev_env/ubuntu/doc_base/22.04/Dockerfile b/dev_env/ubuntu/doc_base/22.04/Dockerfile new file mode 100644 index 0000000..d4028b7 --- /dev/null +++ b/dev_env/ubuntu/doc_base/22.04/Dockerfile @@ -0,0 +1,39 @@ +FROM ubuntu:22.04 +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && \ + apt-get upgrade -y +RUN apt-get install -y \ + autoconf \ + autoconf-archive \ + automake \ + autotools-dev \ + net-tools \ + bison \ + curl \ + flex \ + git \ + sudo \ + vim \ + wget \ + python3-docutils \ + python3-pip \ + python3-pysnmp4 +RUN apt-get install -y \ + texlive-base \ + texlive-latex-base \ + texlive-latex-extra \ + texlive-latex-recommended \ + texlive-extra-utils \ + texlive-fonts-recommended \ + texlive-lang-other \ + texlive-luatex \ + texlive-xetex \ + latexmk +RUN pip install sphinx sphinx_rtd_theme rst2pdf +VOLUME /rsyslog +RUN groupadd rsyslog \ + && useradd -g rsyslog -s /bin/bash rsyslog \ + && echo "rsyslog ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \ + && echo "buildbot ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers +WORKDIR /rsyslog +USER rsyslog diff --git a/dev_env/ubuntu/doc_base/22.04/build.sh b/dev_env/ubuntu/doc_base/22.04/build.sh new file mode 100755 index 0000000..91924d8 --- /dev/null +++ b/dev_env/ubuntu/doc_base/22.04/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +# Use --no-cache to rebuild image +docker build $1 -t rsyslog/rsyslog_dev_doc_base_ubuntu:22.04 . +printf "\n\n================== BUILD DONE\n" diff --git a/dev_env/ubuntu/doc_base/22.04/run.sh b/dev_env/ubuntu/doc_base/22.04/run.sh new file mode 100755 index 0000000..4623eed --- /dev/null +++ b/dev_env/ubuntu/doc_base/22.04/run.sh @@ -0,0 +1,21 @@ +#!/bin/bash +printf "\n\n================== ENTER DOCKER CONTAINER\n" + +if [ "$RSYSLOG_HOME" == "" ]; then + export RSYSLOG_HOME=$(pwd) + echo info: RSYSLOG_HOME not set, using $RSYSLOG_HOME +fi + +printf 'user ids: %s:%s\n' $(id -u) $(id -g) +printf 'container_uid: %s\n' ${RSYSLOG_CONTAINER_UID--u $(id -u):$(id -g)} +printf 'container cmd: %s\n' $* + +# Run docker +docker run \ + --privileged \ + --cap-add=SYS_ADMIN \ + -e ENVTODO \ + ${RSYSLOG_CONTAINER_UID--u $(id -u):$(id -g)} \ + $DOCKER_RUN_EXTRA_FLAGS \ + -v "$RSYSLOG_HOME":/rsyslog \ + -ti --rm rsyslog/rsyslog_dev_doc_base_ubuntu:22.04