Fix that Dockerfile would not run with podman (#4262)

* Fix that Dockerfile would not run with podman

* Migrate away from non-OCI-compliant SHELL command in Dockerfile
pull/3907/head^2
Lennart Buhl 2024-07-13 13:09:51 +02:00 zatwierdzone przez GitHub
rodzic 4286f2c2dd
commit ca2b45a6e2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -7,8 +7,6 @@ ENV TZ=Etc/UTC
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install build deps
USER root
@ -24,10 +22,10 @@ USER mesh
WORKDIR /tmp/firmware
RUN python3 -m venv /tmp/firmware
RUN source ./bin/activate && pip3 install --no-cache-dir -U platformio==6.1.14
RUN bash -o pipefail -c "source bin/activate; pip3 install --no-cache-dir -U platformio==6.1.15"
# trunk-ignore(terrascan/AC_DOCKER_00024): We would actually like these files to be owned by mesh tyvm
COPY --chown=mesh:mesh . /tmp/firmware
RUN source ./bin/activate && chmod +x /tmp/firmware/bin/build-native.sh && ./bin/build-native.sh
RUN bash -o pipefail -c "source ./bin/activate && bash ./bin/build-native.sh"
RUN cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd"