build w/ docker

This commit is contained in:
Robin C. Ladiges 2022-07-09 21:56:38 +02:00 committed by CraftyBoss
parent b3a30b09f7
commit 3325c50c00
2 changed files with 38 additions and 0 deletions

26
Dockerfile Normal file
View file

@ -0,0 +1,26 @@
FROM ubuntu:20.04 as builder
# install dependencies
RUN apt-get update \
&& apt-get install -y \
curl \
apt-transport-https \
python3 \
python3-pip \
&& pip install keystone-engine \
;
# install devkitpro
RUN ln -s /proc/self/mounts /etc/mtab \
&& mkdir /devkitpro/ \
&& echo "deb [signed-by=/devkitpro/pub.gpg] https://apt.devkitpro.org stable main" >/etc/apt/sources.list.d/devkitpro.list \
&& curl --fail -o /devkitpro/pub.gpg https://apt.devkitpro.org/devkitpro-pub.gpg \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y devkitpro-pacman \
&& dkp-pacman --noconfirm -S switch-dev \
;
WORKDIR /app/
ENV DEVKITPRO /opt/devkitpro
ENTRYPOINT make

12
docker-build.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
export DOCKER_BUILDKIT=1
docker build . -t smoo-client-build
docker run --rm \
-u $(id -u):$(id -g) \
-v "/$PWD/":/app/ \
smoo-client-build \
;
docker rmi smoo-client-build
cp -r ./romfs/ ./starlight_patch_*/atmosphere/contents/0100000000010000/.