19 lines
664 B
Docker
19 lines
664 B
Docker
# Build stage - use the same image as sourcemod CI builds
|
|
FROM ghcr.io/alliedmodders/build-containers/debian11:latest AS builder
|
|
|
|
COPY sourcepawn/ /build/sourcepawn/
|
|
|
|
WORKDIR /build/sourcepawn
|
|
RUN mkdir build && cd build && \
|
|
python3 ../configure.py --enable-optimize --targets=x86_64 && \
|
|
ambuild
|
|
|
|
# Runtime stage
|
|
FROM debian:bullseye-slim
|
|
|
|
# AMBuild names the per-target output folder <platform>-<arch>; since this stage
|
|
# always builds linux/x86_64, that's deterministically "linux-x86_64".
|
|
COPY --from=builder --chmod=0755 /build/sourcepawn/build/spcomp/linux-x86_64/spcomp /usr/local/bin/spcomp
|
|
|
|
ENTRYPOINT ["/usr/local/bin/spcomp"]
|