Fixed Docker builds

This commit is contained in:
Jamie Kerber
2024-09-07 16:56:21 +02:00
parent 4f122e5b8c
commit 1e92b51931
4 changed files with 124 additions and 19 deletions

View File

@@ -1,14 +1,22 @@
FROM ubuntu:20.04 as build
FROM ubuntu:20.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
COPY packages.txt /
RUN apt-get update && apt-get install -y $(cat packages.txt)
# (for debug purposes)
RUN echo "System arch: $(uname -a)\nDPKG arch: $(dpkg --print-architecture)"
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install package dependencies
COPY packages.txt ./
RUN apt-get update && apt-get install -y $(cat packages.txt) && rm packages.txt
COPY requirements.txt /
# Install Rust/Cargo
# NOTE: We replace /proc/self/exe with /bin/sh in the script to avoid issues with Docker
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sed 's#/proc/self/exe#\/bin\/sh#g' | CARGO_HOME=/opt/cargo sh -s -- -y
ENV PATH=/opt/cargo/bin:$PATH
# Install Python dependencies
COPY requirements.txt ./
COPY tools/n64splat/requirements.txt ./tools/n64splat/requirements.txt
RUN python3 -m pip install -r requirements.txt
RUN mkdir /banjo
WORKDIR /banjo
ENTRYPOINT ["/bin/bash", "-c"]