|
1 | 1 | FROM debian:12-slim |
2 | 2 | LABEL version="0.2.4-alpha" |
3 | 3 | LABEL vendor1="DanteyPL" |
4 | | - |
5 | 4 | LABEL org.opencontainers.image.licenses="GPL-3.0" |
6 | 5 | LABEL org.opencontainers.image.source="https://github.com/introkun/netpass-docker-builder" |
7 | 6 | LABEL org.opencontainers.image.version="0.2.4-alpha-fork1" |
8 | 7 | LABEL vendor2="introkun" |
9 | 8 |
|
10 | 9 | ARG DEBIAN_FRONTEND=noninteractive |
11 | | -# Install required packages to install dkp |
12 | | -RUN apt-get update && apt-get install -y \ |
13 | | - wget \ |
14 | | - unzip |
| 10 | + |
15 | 11 | WORKDIR /build |
16 | | -# Installation of devkitpro-pacman; Script from https://devkitpro.org/wiki/devkitPro_pacman#:~:text=pacman%20instructions%20below.-,Debian%20and%20derivatives,devkitpro%2Dpacman%0A%20%20%20chmod%20%2Bx%20./install%2Ddevkitpro%2Dpacman%0A%20%20%20sudo%20./install%2Ddevkitpro%2Dpacman,-The%20apt%20repository |
17 | | -RUN wget https://apt.devkitpro.org/install-devkitpro-pacman |
18 | | -RUN chmod +x ./install-devkitpro-pacman |
19 | | -# Workaround for automation |
20 | | -RUN sed -i -e 's/apt-get install/apt-get install -y/' ./install-devkitpro-pacman |
21 | | -RUN eval ./install-devkitpro-pacman |
22 | | -RUN ln -s /proc/self/mounts /etc/mtab |
23 | | -# Installing required SDK for building |
24 | | -RUN dkp-pacman --noconfirm -S 3ds-dev 3ds-curl 3ds-libvorbisidec 3ds-opusfile 3ds-pkg-config |
25 | | -# Exporting required variables to .bashrc to have persistence after reboot of container |
26 | | -RUN echo "export DEVKITPRO=/opt/devkitpro" >> ~/.bashrc \ |
27 | | - && echo "export DEVKITARM=/opt/devkitpro/devkitARM" >> ~/.bashrc \ |
28 | | - && echo "export PATH=$PATH:/opt/devkitpro/devkitARM/bin" >> ~/.bashrc |
29 | | -# Adding required enviroment variables |
30 | | -ENV DEVKITPRO=/opt/devkitpro |
31 | | -ENV DEVKITARM=/opt/devkitpro/devkitARM |
32 | | -ENV PATH="$PATH:/opt/devkitpro/devkitARM/bin" |
33 | | -# Install netpass packages dependencies |
34 | | -RUN apt-get update && apt-get --no-install-recommends install -y \ |
35 | | - ffmpeg \ |
36 | | - git \ |
37 | | - python3 \ |
38 | | - python3-pip |
39 | | -# Install Python requirements |
| 12 | + |
| 13 | +# Install apt dependencies |
| 14 | +RUN apt-get update && \ |
| 15 | + apt-get install -y --no-install-recommends \ |
| 16 | + wget unzip && \ |
| 17 | + rm -rf /var/lib/apt/lists/* |
| 18 | + |
| 19 | +# Install devkitpro pacman |
| 20 | +RUN wget https://apt.devkitpro.org/install-devkitpro-pacman && \ |
| 21 | + chmod +x ./install-devkitpro-pacman && \ |
| 22 | + sed -i -e 's/apt-get install/apt-get install -y/' ./install-devkitpro-pacman && \ |
| 23 | + ./install-devkitpro-pacman && \ |
| 24 | + ln -s /proc/self/mounts /etc/mtab |
| 25 | + |
| 26 | +# Install SDK and tools |
| 27 | +RUN dkp-pacman --noconfirm -S 3ds-dev 3ds-curl 3ds-libvorbisidec 3ds-opusfile 3ds-pkg-config && \ |
| 28 | + dkp-pacman -Scc --noconfirm |
| 29 | + |
| 30 | +# Set environment |
| 31 | +ENV DEVKITPRO=/opt/devkitpro \ |
| 32 | + DEVKITARM=/opt/devkitpro/devkitARM \ |
| 33 | + PATH="$PATH:/opt/devkitpro/devkitARM/bin" |
| 34 | + |
| 35 | +# Install dev dependencies |
| 36 | +RUN apt-get update && \ |
| 37 | + apt-get install -y --no-install-recommends \ |
| 38 | + ffmpeg git python3 python3-pip && \ |
| 39 | + apt-get clean && \ |
| 40 | + rm -rf /var/lib/apt/lists/* |
| 41 | + |
| 42 | +# Install Python package |
40 | 43 | RUN pip install PyYAML --break-system-packages |
41 | | -# Link python3 to python |
42 | | -RUN ln -s $(which python3) /usr/bin/python |
43 | 44 |
|
44 | | -RUN wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.18.4/makerom-v0.18.4-ubuntu_x86_64.zip |
45 | | -RUN unzip makerom-v0.18.4-ubuntu_x86_64.zip -d $DEVKITPRO/tools/bin/ |
46 | | -RUN chmod +x $DEVKITPRO/tools/bin/makerom |
| 45 | +# Link python |
| 46 | +RUN ln -s $(which python3) /usr/bin/python |
47 | 47 |
|
48 | | -RUN wget https://github.com/diasurgical/bannertool/releases/download/1.2.0/bannertool.zip |
49 | | -RUN unzip bannertool.zip -d ./ |
50 | | -RUN cp ./linux-x86_64/bannertool $DEVKITPRO/tools/bin/ |
| 48 | +# Download & install makerom |
| 49 | +RUN wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.18.4/makerom-v0.18.4-ubuntu_x86_64.zip && \ |
| 50 | + unzip makerom-v0.18.4-ubuntu_x86_64.zip -d $DEVKITPRO/tools/bin/ && \ |
| 51 | + chmod +x $DEVKITPRO/tools/bin/makerom && \ |
| 52 | + rm makerom-v0.18.4-ubuntu_x86_64.zip |
51 | 53 |
|
52 | | -COPY ./docker-entrypoint.sh ./ |
| 54 | +# Download & install bannertool |
| 55 | +RUN wget https://github.com/diasurgical/bannertool/releases/download/1.2.0/bannertool.zip && \ |
| 56 | + unzip bannertool.zip -d ./ && \ |
| 57 | + cp ./linux-x86_64/bannertool $DEVKITPRO/tools/bin/ && \ |
| 58 | + rm bannertool.zip |
53 | 59 |
|
54 | | -# Clean package cache and list |
55 | | -RUN rm -rf /var/cache/apt/archives /var/lib/apt/lists/* |
56 | | -RUN rm makerom-v0.18.4-ubuntu_x86_64.zip bannertool.zip |
| 60 | +COPY ./docker-entrypoint.sh ./ |
| 61 | +RUN chmod +x /build/docker-entrypoint.sh |
57 | 62 |
|
58 | 63 | WORKDIR /build/source |
59 | | -RUN chmod +x /build/docker-entrypoint.sh |
60 | | -ENTRYPOINT [ "/build/docker-entrypoint.sh" ] |
| 64 | +ENTRYPOINT ["/build/docker-entrypoint.sh"] |
0 commit comments