diff --git a/.justfile b/.justfile index 9f602a06..c2f7be1a 100644 --- a/.justfile +++ b/.justfile @@ -54,8 +54,12 @@ gh-test: gh: gh-fmt gh-clippy gh-test +debian: + docker build -f scripts/Dockerfile -t aoc scripts/ + docker run --rm -ti -v $PWD:/aoc -w /aoc aoc + sid: - docker build -f scripts/Dockerfile -t aoc-sid scripts/ + docker build -f scripts/Dockerfile-sid -t aoc-sid scripts/ docker run --rm -ti -v $PWD:/aoc -w /aoc aoc-sid fedora: diff --git a/scripts/Dockerfile b/scripts/Dockerfile index 74f2aebc..bd7b397f 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:sid +FROM debian RUN apt-get update && \ apt-get upgrade -y && \ @@ -38,18 +38,17 @@ RUN apt-get install -y -qq lua5.4 # Ruby RUN apt-get install -y -qq ruby -# Java -RUN apt-get install -y -qq default-jdk - # C# RUN apt-get install -y -qq mono-mcs # Swift -RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq swiftlang +# RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq swiftlang # JavaScript RUN curl -fsSL https://bun.sh/install | bash +# Java +RUN apt-get install -y -qq default-jdk # User environment ARG HOST_U=1027 diff --git a/scripts/Dockerfile-fedora b/scripts/Dockerfile-fedora index 7c7a1cea..653c774e 100644 --- a/scripts/Dockerfile-fedora +++ b/scripts/Dockerfile-fedora @@ -6,10 +6,8 @@ RUN dnf upgrade -y && \ dnf install -y cmake gdb clang llvm z3-devel # Python -RUN dnf install -y python3-pip python3-numpy python3-tabulate python3-click python3-devel -COPY requirements.txt / -RUN python3 -mvenv /venv/python && \ - /venv/python/bin/pip install -r /requirements.txt +RUN dnf install -y python3-pip python3-devel python3-numpy python3-tabulate python3-click python3-curtsies python3-shapely python3-sympy python3-networkx python3-z3 +RUN python3 -mvenv /venv/python --system-site-packages # Rust RUN dnf install -y cargo cargo-fmt cargo-clippy diff --git a/scripts/Dockerfile-sid b/scripts/Dockerfile-sid new file mode 100644 index 00000000..858cf6be --- /dev/null +++ b/scripts/Dockerfile-sid @@ -0,0 +1,43 @@ +FROM debian:sid + +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y vim curl wget sudo sqlite3 vim && \ + apt-get install -y build-essential cmake gdb python3-full python3-numpy python3-tabulate python3-click python3-curtsies python3-shapely python3-sympy python3-networkx python3-z3 && \ + apt-get install -y clang llvm && \ + apt-get install -y z3 + +# Rust +RUN apt-get install -y cargo rust-all + +# Golang +RUN apt-get install -y -qq golang + +# Lua +RUN apt-get install -y -qq lua5.4 + +# Ruby +RUN apt-get install -y -qq ruby + +# C# +RUN apt-get install -y -qq mono-mcs + +# Swift +RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq swiftlang + +# JavaScript +RUN apt-get install -y -qq nodejs + +# Java +RUN apt-get install -y -qq default-jdk + +# User environment +ARG HOST_U=1027 +ARG HOST_G=100 +ARG HOST_UN=user +RUN useradd --create-home --no-user-group -g $HOST_G -u $HOST_U $HOST_UN +RUN echo "$HOST_UN ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +RUN echo 'export SHELL=/bin/bash' >> /etc/bash.bashrc +RUN echo 'alias ll="ls -l --color"' >> /etc/bash.bashrc + +RUN echo '[ -f /venv/python/bin/activate ] && source /venv/python/bin/activate' >> /etc/bash.bashrc