-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (37 loc) · 1.62 KB
/
Copy pathDockerfile
File metadata and controls
51 lines (37 loc) · 1.62 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
42
43
44
45
46
47
48
49
50
51
ARG FIVEM_NUM=35214
ARG FIVEM_VER=35214-f5a29190639b9a4722c1d5cde9f03a9ced5d2677
ARG DATA_VER=0e7ba538339f7c1c26d0e689aa750a336576cf02
FROM spritsail/alpine:3.23 AS builder
ARG FIVEM_VER
ARG DATA_VER
WORKDIR /output
RUN wget -O- https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/${FIVEM_VER}/fx.tar.xz \
| tar xJ --strip-components=1 \
--exclude alpine/dev --exclude alpine/proc \
--exclude alpine/run --exclude alpine/sys \
&& mkdir -p /output/opt/cfx-server-data /output/usr/local/share \
&& wget -O- http://github.com/citizenfx/cfx-server-data/archive/${DATA_VER}.tar.gz \
| tar xz --strip-components=1 -C opt/cfx-server-data
ADD server.cfg opt/cfx-server-data
ADD entrypoint usr/bin/entrypoint
RUN chmod +x /output/usr/bin/entrypoint
#================
FROM scratch
ARG FIVEM_VER
ARG FIVEM_NUM
ARG DATA_VER
LABEL org.opencontainers.image.authors="Spritsail <fivem@spritsail.io>" \
org.opencontainers.image.vendor="Spritsail" \
org.opencontainers.image.title="FiveM" \
org.opencontainers.image.url="https://fivem.net" \
org.opencontainers.image.description="FiveM is a modification for Grand Theft Auto V enabling you to play multiplayer on customized dedicated servers." \
org.opencontainers.image.version=${FIVEM_NUM} \
io.spritsail.version.fivem=${FIVEM_VER} \
io.spritsail.version.fivem_data=${DATA_VER}
COPY --from=builder /output/ /
RUN apk add --no-cache tini
WORKDIR /config
EXPOSE 30120
# Default to an empty CMD, so we can use it to add seperate args to the binary
CMD [""]
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/entrypoint"]