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
This commit is contained in:
Lennart Buhl 2024-07-13 13:09:51 +02:00 committed by GitHub
parent 4286f2c2dd
commit ca2b45a6e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"