Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.git
.env
.envrc
.python-version
aoc_timestamp.txt
34 changes: 17 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
FROM python:3.11-slim
# Stage 1: Build the application
FROM golang:1.25-trixie as builder

Check warning on line 2 in Dockerfile

View workflow job for this annotation

GitHub Actions / build / build

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

# Magic python/pip environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on
RUN mkdir /build

RUN pip install poetry
WORKDIR /app

WORKDIR /etc/adventofcode
ADD ./go.mod ./go.sum ./
RUN go mod download

COPY pyproject.toml poetry.lock ./
RUN apt-get update && apt-get install -y build-essential \
&& poetry install \
&& apt-get remove -y --purge build-essential \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
COPY . .
ADD . ./
RUN go build -v -o /build/ ./cmd/*

CMD ["poetry", "run", "python", "-m", "adventofcode"]
# Stage 2: Copy files and configure what we need
FROM debian:trixie-slim

RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*

COPY entrypoint.sh /usr/local/bin/seabird-entrypoint.sh
COPY --from=builder /build /bin

CMD ["/usr/local/bin/seabird-entrypoint.sh"]
42 changes: 0 additions & 42 deletions adventofcode/__init__.py

This file was deleted.

9 changes: 0 additions & 9 deletions adventofcode/__main__.py

This file was deleted.

174 changes: 0 additions & 174 deletions adventofcode/handlers.py

This file was deleted.

69 changes: 0 additions & 69 deletions adventofcode/leaderboard.py

This file was deleted.

Loading