diff --git a/.admin/docker/Dockerfile b/.admin/Dockerfile similarity index 51% rename from .admin/docker/Dockerfile rename to .admin/Dockerfile index c964973..3d46de9 100644 --- a/.admin/docker/Dockerfile +++ b/.admin/Dockerfile @@ -5,18 +5,20 @@ FROM python:3.12-slim-bullseye LABEL org.opencontainers.image.authors="nilknarf " LABEL org.opencontainers.image.source="https://github.com/DEAD10C5/1337-Noms-The-Hacker-Cookbook" LABEL org.opencontainers.image.description="Ye Olde Hacker Cookbook" -LABEL org.opencontainers.image.licenses="CCC 1.0" +LABEL org.opencontainers.image.licenses="CC BY-ND 4.0 DEED" ENV DEBIAN_FRONTEND noninteractive ADD . /app -WORKDIR /app +WORKDIR /app/.admin RUN \ - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367;\ - apt update; \ - apt install -y apt-utils;\ - apt -y autoremove;\ - apt install -y make git + apt-get update; \ + apt-get install -y gnupg2 apt-utils;\ + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367;\ + apt-get -y autoremove;\ + apt-get install -y make git # Python3 setup -RUN pip3 install -rrequirements.txt +RUN ls;\ +pip install --upgrade pip;\ + pip3 install -rsrc/requirements.txt diff --git a/.admin/Makefile.am b/.admin/Makefile.am index 961c130..9d57d9f 100644 --- a/.admin/Makefile.am +++ b/.admin/Makefile.am @@ -8,17 +8,18 @@ clean: @find . -name '*.pyc' | xargs rm -rf @find . -name '__pycache__' | xargs rm -rf @for trash in aclocal.m4 autom4te.cache config config.log config.status configure configure~ \ - libtool Makefile Makefile.in docker/Makefile docker/Makefile.in; do \ + libtool Makefile Makefile.in; do \ if [ -f $$trash ] || [ -d $$trash ]; then \ echo "Removing $$trash" ;\ rm -rf $$trash ;\ fi ; \ + docker system prune -y done docker: @if [ -f /.dockerenv ]; then echo "Don't run make docker inside docker container" && exit 1; fi - docker-compose -f docker/docker-compose.yml build hacker_cookbook - @docker-compose -f docker/docker-compose.yml run hacker_cookbook /bin/bash + docker-compose -f docker-compose.yml build hacker_cookbook + @docker-compose -f docker-compose.yml run hacker_cookbook /bin/bash python: python3 -m venv _build diff --git a/.admin/README.md b/.admin/README.md index 7cb6398..5d3a59a 100644 --- a/.admin/README.md +++ b/.admin/README.md @@ -15,3 +15,10 @@ You can generate a PDF of this book. ### make docker Build a Docker container with the application. + +## OpenBSD + +```sh +doas pkg_add latexmk +``` + diff --git a/.admin/bootstrap.sh b/.admin/bootstrap.sh index 8c5931b..0cb68b5 100755 --- a/.admin/bootstrap.sh +++ b/.admin/bootstrap.sh @@ -229,7 +229,7 @@ function install_debian() { # sudo apt install gnuplot gawk libtool psutils make autopoint #declare -a Packages=( "doxygen" "gawk" "doxygen-latex" "automake" ) # sudo apt install gnuplot gawk libtool psutils make autoconf automake texlive-latex-extra fig2dev - declare -a Packages=("git" "make" "automake" "libtool") # "python3-pygit2" ) + declare -a Packages=("git" "make" "m4" "autoconf" "libtool" ) # "python3-pygit2" ) # Container package installs will fail unless you do an initial update, the upgrade is optional if [ "${CONTAINER}" = true ]; then diff --git a/.admin/docker/docker-compose.yml b/.admin/docker-compose.yml similarity index 78% rename from .admin/docker/docker-compose.yml rename to .admin/docker-compose.yml index 1eb5d26..d08e8d4 100644 --- a/.admin/docker/docker-compose.yml +++ b/.admin/docker-compose.yml @@ -2,8 +2,8 @@ version: '3' services: hacker_cookbook: build: - context: .. - dockerfile: docker/Dockerfile + context: ../.admin + dockerfile: Dockerfile args: USER_ID: ${USER_ID:-0} GROUP_ID: ${GROUP_ID:-0} diff --git a/.admin/docker/README.md b/.admin/docker/README.md deleted file mode 100644 index 1bbd583..0000000 --- a/.admin/docker/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# docker - -Build a Docker container with the application.