Skip to content

Commit 6dfd614

Browse files
committed
dockerfiles
1 parent ea8dd33 commit 6dfd614

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

scripts/Dockerfile-alpine

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM rust:alpine AS builder
1+
FROM rust:alpine
22

33
RUN apk update && \
4-
apk add --no-cache bash vim curl vim && \
5-
apk add --no-cache py3-numpy py3-tabulate py3-click && \
6-
apk add --no-cache clang llvm clang-dev sqlite-dev z3-dev
4+
apk add --no-cache bash vim curl wget sudo sqlite && \
5+
apk add --no-cache py3-click py3-tabulate py3-numpy && \
6+
apk add --no-cache clang clang-dev sqlite-dev z3-dev
77

88
ENV RUSTFLAGS='-C target-feature=-crt-static'
99

@@ -14,7 +14,7 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
1414
WORKDIR /aoc
1515

1616
RUN . /etc/os-release && \
17-
echo "export AOC_TARGET_DIR=target/${ID}-${VERSION_ID}" >> /root/.bashrc && \
18-
echo "export CARGO_TARGET_DIR=target/${ID}-${VERSION_ID}/$(rustc --version | cut -f2 -d' ')-$(rustc --print host-tuple)" >> /root/.bashrc
17+
echo "export AOC_TARGET_DIR=target/${ID}-${VERSION_ID}" >> /etc/bash/bashrc && \
18+
echo "export CARGO_TARGET_DIR=target/${ID}-${VERSION_ID}/$(rustc --version | cut -f2 -d' ')-$(rustc --print host-tuple)" >> /etc/bash/bashrc
1919

20-
ENTRYPOINT ["/bin/bash"]
20+
CMD ["/bin/bash"]

scripts/Dockerfile-debian

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM debian:stable AS builder
1+
FROM debian
22

33
ENV DEBIAN_FRONTEND=noninteractive
44
RUN apt-get update && \
55
apt-get upgrade -y && \
6-
apt-get install -y bash vim curl wget sudo sqlite3 vim \
7-
build-essential cmake gdb python3 python3-venv python3-numpy python3-tabulate python3-click \
8-
clang llvm z3 libsqlite3-dev
6+
apt-get install -y bash vim curl wget sudo sqlite3 \
7+
build-essential python3 python3-venv python3-click python3-tabulate python3-numpy python3-curtsies \
8+
clang libz3-dev libsqlite3-dev
99

1010
# Rust
1111
ENV CARGO_HOME=/usr/local/cargo
@@ -45,7 +45,7 @@ RUN apt-get install -y -qq default-jdk
4545
WORKDIR /aoc
4646

4747
RUN . /etc/os-release && \
48-
echo "export AOC_TARGET_DIR=target/${ID}-${VERSION_ID}" >> /root/.bashrc && \
49-
echo "export CARGO_TARGET_DIR=target/${ID}-${VERSION_ID}/$(rustc --version | cut -f2 -d' ')-$(rustc --print host-tuple)" >> /root/.bashrc
48+
echo "export AOC_TARGET_DIR=target/${ID}-${VERSION_ID}" >> /etc/bash.bashrc && \
49+
echo "export CARGO_TARGET_DIR=target/${ID}-${VERSION_ID}/$(rustc --version | cut -f2 -d' ')-$(rustc --print host-tuple)" >> /etc/bash.bashrc
5050

51-
ENTRYPOINT ["/bin/bash"]
51+
CMD ["/bin/bash"]

scripts/Dockerfile-fedora

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
FROM fedora
22

33
RUN dnf upgrade -y && \
4-
dnf install -y vim curl wget sudo sqlite3 vim just && \
4+
dnf install -y bash vim curl wget sudo sqlite3 && \
5+
dnf install -y python3-pip python3-numpy python3-tabulate python3-click python3-curtsies && \
56
dnf group install -y development-tools c-development && \
6-
dnf install -y cmake gdb clang llvm z3-devel sqlite-devel
7+
dnf install -y clang z3-devel sqlite-devel
78

89
# Python
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 dnf install -y python3-shapely python3-sympy python3-networkx python3-z3
1011
RUN python3 -mvenv /venv/python --system-site-packages
1112

1213
# Rust
@@ -43,7 +44,7 @@ ENV Z3_SYS_Z3_HEADER=/usr/include/z3/z3.h
4344
WORKDIR /aoc
4445

4546
RUN . /etc/os-release && \
46-
echo "export AOC_TARGET_DIR=target/${ID}-${VERSION_ID}" >> /root/.bashrc && \
47-
echo "export CARGO_TARGET_DIR=target/${ID}-${VERSION_ID}/$(rustc --version | cut -f2 -d' ')-$(rustc --print host-tuple)" >> /root/.bashrc
47+
echo "export AOC_TARGET_DIR=target/${ID}-${VERSION_ID}" >> /etc/bashrc && \
48+
echo "export CARGO_TARGET_DIR=target/${ID}-${VERSION_ID}/$(rustc --version | cut -f2 -d' ')-$(rustc --print host-tuple)" >> /etc/bashrc
4849

49-
ENTRYPOINT ["/bin/bash"]
50+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)