kaikki mankelissa

This commit is contained in:
Aaro Koivukangas
2026-01-14 18:26:04 +02:00
parent 66905ba2c1
commit d998e9eccc
9 changed files with 423 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
FROM alpine:3.23 AS builder
RUN apk update
RUN apk add --no-cache build-base git
RUN apk add --no-cache cmake cmake-doc cmake-extras pkgconf
RUN apk add --no-cache python poetry
WORKDIR /usr/src/app
COPY . .
RUN mkdir build/ && cd build && cmake .. && make
FROM python:slim AS runner
ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_CACHE_DIR='/var/cache/pypoetry' \
POETRY_HOME='/usr/local' \
# System deps:
RUN curl -sSL https://install.python-poetry.org | python3 -
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/build/compilers_compiler /usr/src/app/compilers_compiler
COPY --from=builder src/server server
WORKDIR /usr/src/app/server
RUN poetry install --no-interaction --no-ansi
# CMD ["/usr/src/app/compilers_compiler", "serve", "3000"]
CMD [ "./compilers_compiler"]