Skip to content

Commit 3b5bc1d

Browse files
committed
dockerfile
1 parent 76de365 commit 3b5bc1d

File tree

4 files changed

+54
-10
lines changed

4 files changed

+54
-10
lines changed

.justfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@ gh-test:
5454
gh: gh-fmt gh-clippy gh-test
5555

5656

57+
debian:
58+
docker build -f scripts/Dockerfile -t aoc scripts/
59+
docker run --rm -ti -v $PWD:/aoc -w /aoc aoc
60+
5761
sid:
58-
docker build -f scripts/Dockerfile -t aoc-sid scripts/
62+
docker build -f scripts/Dockerfile-sid -t aoc-sid scripts/
5963
docker run --rm -ti -v $PWD:/aoc -w /aoc aoc-sid
6064

6165
fedora:

scripts/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:sid
1+
FROM debian
22

33
RUN apt-get update && \
44
apt-get upgrade -y && \
@@ -38,18 +38,17 @@ RUN apt-get install -y -qq lua5.4
3838
# Ruby
3939
RUN apt-get install -y -qq ruby
4040

41-
# Java
42-
RUN apt-get install -y -qq default-jdk
43-
4441
# C#
4542
RUN apt-get install -y -qq mono-mcs
4643

4744
# Swift
48-
RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq swiftlang
45+
# RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq swiftlang
4946

5047
# JavaScript
5148
RUN curl -fsSL https://bun.sh/install | bash
5249

50+
# Java
51+
RUN apt-get install -y -qq default-jdk
5352

5453
# User environment
5554
ARG HOST_U=1027

scripts/Dockerfile-fedora

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ RUN dnf upgrade -y && \
66
dnf install -y cmake gdb clang llvm z3-devel
77

88
# Python
9-
RUN dnf install -y python3-pip python3-numpy python3-tabulate python3-click python3-devel
10-
COPY requirements.txt /
11-
RUN python3 -mvenv /venv/python && \
12-
/venv/python/bin/pip install -r /requirements.txt
9+
RUN dnf install -y python3-pip python3-devel python3-numpy python3-tabulate python3-click python3-curtsies python3-shapely python3-sympy python3-networkx python3-z3
10+
RUN python3 -mvenv /venv/python --system-site-packages
1311

1412
# Rust
1513
RUN dnf install -y cargo cargo-fmt cargo-clippy

scripts/Dockerfile-sid

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
FROM debian:sid
2+
3+
RUN apt-get update && \
4+
apt-get upgrade -y && \
5+
apt-get install -y vim curl wget sudo sqlite3 vim && \
6+
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 && \
7+
apt-get install -y clang llvm && \
8+
apt-get install -y z3
9+
10+
# Rust
11+
RUN apt-get install -y cargo rust-all
12+
13+
# Golang
14+
RUN apt-get install -y -qq golang
15+
16+
# Lua
17+
RUN apt-get install -y -qq lua5.4
18+
19+
# Ruby
20+
RUN apt-get install -y -qq ruby
21+
22+
# C#
23+
RUN apt-get install -y -qq mono-mcs
24+
25+
# Swift
26+
RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq swiftlang
27+
28+
# JavaScript
29+
RUN apt-get install -y -qq nodejs
30+
31+
# Java
32+
RUN apt-get install -y -qq default-jdk
33+
34+
# User environment
35+
ARG HOST_U=1027
36+
ARG HOST_G=100
37+
ARG HOST_UN=user
38+
RUN useradd --create-home --no-user-group -g $HOST_G -u $HOST_U $HOST_UN
39+
RUN echo "$HOST_UN ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
40+
RUN echo 'export SHELL=/bin/bash' >> /etc/bash.bashrc
41+
RUN echo 'alias ll="ls -l --color"' >> /etc/bash.bashrc
42+
43+
RUN echo '[ -f /venv/python/bin/activate ] && source /venv/python/bin/activate' >> /etc/bash.bashrc

0 commit comments

Comments
 (0)