-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 885 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (23 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM debian:trixie AS build-env
WORKDIR /build
COPY . .
# Install build dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
libc6 build-essential nasm patchelf zip git
# Build the x64 bundle
RUN bash .github/scripts/build-bundle.sh x64
# Create the config before installing so the install script doesn't override it
RUN mkdir -p /opt/nasmserver
RUN sed -e 's|DOCUMENT_ROOT=./www|DOCUMENT_ROOT=/var/www/html|' \
./.env.example > "/opt/nasmserver/config.cfg"
RUN cd bundle-x64 && ./install
# Use a slim image to keep the final image size minimal
FROM debian:trixie-slim
WORKDIR /opt/nasmserver
# Only copy the installed server files from the build stage
COPY --from=build-env /opt/nasmserver /opt/nasmserver
COPY --from=build-env /var/www/nasmserver /var/www/html
ENV PATH="/opt/nasmserver:$PATH"
EXPOSE 8080
ENTRYPOINT ["nasmserver"]
CMD []