-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
41 lines (32 loc) · 1.26 KB
/
Containerfile
File metadata and controls
41 lines (32 loc) · 1.26 KB
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
34
35
36
37
38
39
40
41
FROM docker.io/rust:1.83-alpine AS rust-builder
RUN apk add --no-cache alpine-sdk
WORKDIR /usr/src/rcon-rs
COPY ./rcon-rs/ .
RUN cargo install --path .
WORKDIR /usr/src/image-rs-convert
COPY ./image-rs-convert/ .
RUN cargo install --path .
FROM ghcr.io/ja-cop/racket-alpine:8.15 AS racket-builder
COPY ./data/ /usr/share/sc-chat-bridge/
RUN raco pkg install \
--scope installation \
--batch \
--deps search-auto \
--no-docs \
racket-cord http-easy && \
rm -rf /root/.cache/racket
WORKDIR /usr/src/sc-chat-bridge
COPY ./src/ .
RUN raco exe sc-chat-bridge.rkt
WORKDIR /output
RUN raco distribute sc-chat-bridge /usr/src/sc-chat-bridge/sc-chat-bridge
FROM docker.io/library/alpine:latest
LABEL org.opencontainers.image.source=https://github.com/ja-cop/sc-chat-bridge
RUN apk add --no-cache lz4-dev ncurses-dev
COPY ./data/ /usr/share/sc-chat-bridge/
COPY --from=rust-builder /usr/local/cargo/bin/rcon-rs /usr/local/bin/rcon-rs
COPY --from=rust-builder /usr/local/cargo/bin/image-rs-convert /usr/local/bin/image-rs-convert
COPY --from=racket-builder /output/sc-chat-bridge /opt/sc-chat-bridge
RUN ln -s /opt/sc-chat-bridge/bin/sc-chat-bridge /usr/local/bin/sc-chat-bridge
COPY ./container-start.sh /usr/local/bin/container-start
CMD ["container-start"]