Skip to content

Commit da6606f

Browse files
committed
chore: [torrust#685] fix Containerfile linter warning
1 parent 50aa14e commit da6606f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Containerfile

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
# Torrust Index
44

55
## Builder Image
6-
FROM rust:bookworm as chef
6+
FROM rust:bookworm AS chef
77
WORKDIR /tmp
88
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
99
RUN cargo binstall --no-confirm cargo-chef cargo-nextest
1010

1111
## Tester Image
12-
FROM rust:slim-bookworm as tester
12+
FROM rust:slim-bookworm AS tester
1313
WORKDIR /tmp
1414

1515
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/; \
2121
sqlite3 /app/share/torrust/default/database/index.sqlite3.db "VACUUM;"
2222

2323
## Su Exe Compile
24-
FROM docker.io/library/gcc:bookworm as gcc
24+
FROM docker.io/library/gcc:bookworm AS gcc
2525
COPY ./contrib/dev-tools/su-exec/ /usr/local/src/su-exec/
2626
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
2727

@@ -62,7 +62,7 @@ RUN cargo nextest archive --tests --benches --examples --workspace --all-targets
6262

6363

6464
# Extract and Test (debug)
65-
FROM tester as test_debug
65+
FROM tester AS test_debug
6666
WORKDIR /test
6767
COPY . /test/src/
6868
COPY --from=build_debug \
@@ -76,7 +76,7 @@ RUN mkdir -p /app/bin/; cp -l /test/src/target/debug/torrust-index /app/bin/torr
7676
RUN chown -R root:root /app; chmod -R u=rw,go=r,a+X /app; chmod -R a+x /app/bin
7777

7878
# Extract and Test (release)
79-
FROM tester as test
79+
FROM tester AS test
8080
WORKDIR /test
8181
COPY . /test/src
8282
COPY --from=build \
@@ -93,7 +93,7 @@ RUN chown -R root:root /app; chmod -R u=rw,go=r,a+X /app; chmod -R a+x /app/bin
9393

9494

9595
## Runtime
96-
FROM gcr.io/distroless/cc-debian12:debug as runtime
96+
FROM gcr.io/distroless/cc-debian12:debug AS runtime
9797
RUN ["/busybox/cp", "-sp", "/busybox/sh","/busybox/cat","/busybox/ls","/busybox/env", "/bin/"]
9898
COPY --from=gcc --chmod=0555 /usr/local/bin/su-exec /bin/su-exec
9999

@@ -124,14 +124,14 @@ ENTRYPOINT ["/usr/local/bin/entry.sh"]
124124

125125

126126
## Torrust-Index (debug)
127-
FROM runtime as debug
127+
FROM runtime AS debug
128128
ENV RUNTIME="debug"
129129
COPY --from=test_debug /app/ /usr/
130130
RUN env
131131
CMD ["sh"]
132132

133133
## Torrust-Index (release) (default)
134-
FROM runtime as release
134+
FROM runtime AS release
135135
ENV RUNTIME="release"
136136
COPY --from=test /app/ /usr/
137137
HEALTHCHECK --interval=5s --timeout=5s --start-period=3s --retries=3 \

0 commit comments

Comments
 (0)