3
3
# Torrust Tracker
4
4
5
5
# # Builder Image
6
- FROM docker.io/library/rust:bookworm as chef
6
+ FROM docker.io/library/rust:bookworm AS chef
7
7
WORKDIR /tmp
8
8
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
9
9
RUN cargo binstall --no-confirm cargo-chef cargo-nextest
10
10
11
11
# # Tester Image
12
- FROM docker.io/library/rust:slim-bookworm as tester
12
+ FROM docker.io/library/rust:slim-bookworm AS tester
13
13
WORKDIR /tmp
14
14
15
15
RUN apt-get update; apt-get install -y curl sqlite3; apt-get autoclean
@@ -21,7 +21,7 @@ RUN mkdir -p /app/share/torrust/default/database/; \
21
21
sqlite3 /app/share/torrust/default/database/tracker.sqlite3.db "VACUUM;"
22
22
23
23
# # Su Exe Compile
24
- FROM docker.io/library/gcc:bookworm as gcc
24
+ FROM docker.io/library/gcc:bookworm AS gcc
25
25
COPY ./contrib/dev-tools/su-exec/ /usr/local/src/su-exec/
26
26
RUN cc -Wall -Werror -g /usr/local/src/su-exec/su-exec.c -o /usr/local/bin/su-exec; chmod +x /usr/local/bin/su-exec
27
27
@@ -62,7 +62,7 @@ RUN cargo nextest archive --tests --benches --examples --workspace --all-targets
62
62
63
63
64
64
# Extract and Test (debug)
65
- FROM tester as test_debug
65
+ FROM tester AS test_debug
66
66
WORKDIR /test
67
67
COPY . /test/src/
68
68
COPY --from=build_debug \
@@ -76,7 +76,7 @@ RUN mkdir /app/lib/; cp -l $(realpath $(ldd /app/bin/torrust-tracker | grep "lib
76
76
RUN chown -R root:root /app; chmod -R u=rw,go=r,a+X /app; chmod -R a+x /app/bin
77
77
78
78
# Extract and Test (release)
79
- FROM tester as test
79
+ FROM tester AS test
80
80
WORKDIR /test
81
81
COPY . /test/src
82
82
COPY --from=build \
@@ -91,7 +91,7 @@ RUN chown -R root:root /app; chmod -R u=rw,go=r,a+X /app; chmod -R a+x /app/bin
91
91
92
92
93
93
# # Runtime
94
- FROM gcr.io/distroless/cc-debian12:debug as runtime
94
+ FROM gcr.io/distroless/cc-debian12:debug AS runtime
95
95
RUN ["/busybox/cp" , "-sp" , "/busybox/sh" ,"/busybox/cat" ,"/busybox/ls" ,"/busybox/env" , "/bin/" ]
96
96
COPY --from=gcc --chmod=0555 /usr/local/bin/su-exec /bin/su-exec
97
97
@@ -129,14 +129,14 @@ ENTRYPOINT ["/usr/local/bin/entry.sh"]
129
129
130
130
131
131
# # Torrust-Tracker (debug)
132
- FROM runtime as debug
132
+ FROM runtime AS debug
133
133
ENV RUNTIME="debug"
134
134
COPY --from=test_debug /app/ /usr/
135
135
RUN env
136
136
CMD ["sh" ]
137
137
138
138
# # Torrust-Tracker (release) (default)
139
- FROM runtime as release
139
+ FROM runtime AS release
140
140
ENV RUNTIME="release"
141
141
COPY --from=test /app/ /usr/
142
142
HEALTHCHECK --interval=5s --timeout=5s --start-period=3s --retries=3 \
0 commit comments