Skip to content

Commit

Permalink
dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rene-d committed Jan 15, 2025
1 parent 76de365 commit 3b5bc1d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 4 additions & 5 deletions scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:sid
FROM debian

RUN apt-get update && \
apt-get upgrade -y && \
Expand Down Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions scripts/Dockerfile-fedora
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 43 additions & 0 deletions scripts/Dockerfile-sid
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3b5bc1d

Please sign in to comment.