From 3498ac4759d017f230923659b43068a1faf8fb6e Mon Sep 17 00:00:00 2001 From: Chun-Hung Tseng Date: Sat, 15 Feb 2025 01:35:24 +0100 Subject: [PATCH] Address linter issues on Dockerfiles Address casing issue reported by the linter: FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/ Signed-off-by: Chun-Hung Tseng --- Dockerfile | 4 ++-- docker/Dockerfile-gcc | 4 ++-- docker/Dockerfile-sail | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5d099b11..e61a8585 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.19 as base_gcc +FROM alpine:3.19 AS base_gcc RUN apk add --update alpine-sdk git wget @@ -10,7 +10,7 @@ COPY . . RUN make ENABLE_SDL=0 RUN make tool -FROM alpine:3.19 as final +FROM alpine:3.19 AS final # copy in elf files COPY ./build/*.elf /home/root/rv32emu/build/ diff --git a/docker/Dockerfile-gcc b/docker/Dockerfile-gcc index dfbd3205..9dc304be 100644 --- a/docker/Dockerfile-gcc +++ b/docker/Dockerfile-gcc @@ -1,6 +1,6 @@ # we align the version used in riscv-toolchain-install.sh -FROM ubuntu:24.04 as base +FROM ubuntu:24.04 AS base # for x86-64, we can optimize this part and take the upstream (nightly) build directly # for aarch64, we need to build from scratch because the upstream toolchain is only built for x86-64 @@ -16,7 +16,7 @@ RUN cd riscv-gnu-toolchain && \ make -j$(nproc) newlib && \ make clean -FROM ubuntu:24.04 as final +FROM ubuntu:24.04 AS final # Keep the GNU Toolchain files only COPY --from=base /opt/riscv/ /opt/riscv/ diff --git a/docker/Dockerfile-sail b/docker/Dockerfile-sail index 306ceb57..5a60e762 100644 --- a/docker/Dockerfile-sail +++ b/docker/Dockerfile-sail @@ -1,4 +1,4 @@ -FROM ubuntu:24.04 as base +FROM ubuntu:24.04 AS base # The upstream reference emulator is built for x86-64, and the releases are pretty out of date # Thus, we build it ourselves for both x86-64 and aarch64 @@ -21,7 +21,7 @@ RUN cd sail-riscv && \ make && \ ARCH=RV32 make -FROM ubuntu:24.04 as final +FROM ubuntu:24.04 AS final # keep the emulator only COPY --from=base /sail-riscv/c_emulator/riscv_sim_RV32 /home/root/riscv_sim_RV32