forked from DanteyPL/netpass-docker-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (62 loc) · 2.88 KB
/
Dockerfile
File metadata and controls
70 lines (62 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM debian:12-slim
LABEL version="0.2.4-alpha"
LABEL vendor1="DanteyPL"
LABEL org.opencontainers.image.licenses="GPL-3.0"
LABEL org.opencontainers.image.source="https://github.com/introkun/netpass-docker-builder"
LABEL org.opencontainers.image.version="0.2.4-alpha-fork1"
LABEL vendor2="introkun"
ARG DEBIAN_FRONTEND=noninteractive
# Install required packages to install dkp
RUN apt-get update && apt-get install -y \
wget \
unzip
WORKDIR /build
# 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
RUN wget https://apt.devkitpro.org/install-devkitpro-pacman
RUN chmod +x ./install-devkitpro-pacman
# Workaround for automation
RUN sed -i -e 's/apt-get install/apt-get install -y/' ./install-devkitpro-pacman
RUN eval ./install-devkitpro-pacman
RUN ln -s /proc/self/mounts /etc/mtab
# Installing required SDK for building
RUN dkp-pacman --noconfirm -S 3ds-dev 3ds-curl 3ds-libvorbisidec 3ds-opusfile 3ds-pkg-config
# Exporting required variables to .bashrc to have persistence after reboot of container
RUN echo "export DEVKITPRO=/opt/devkitpro" >> ~/.bashrc \
&& echo "export DEVKITARM=/opt/devkitpro/devkitARM" >> ~/.bashrc \
&& echo "export PATH=$PATH:/opt/devkitpro/devkitARM/bin" >> ~/.bashrc
# Adding required enviroment variables
ENV DEVKITPRO=/opt/devkitpro
ENV DEVKITARM=/opt/devkitpro/devkitARM
ENV PATH="$PATH:/opt/devkitpro/devkitARM/bin"
# Install Python and dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-venv \
python3-distutils \
ca-certificates \
ffmpeg \
git \
&& update-ca-certificates \
&& apt-get install --only-upgrade cppcheck \
&& rm -rf /var/lib/apt/lists/*
# Install Python requirements
RUN python3 -m pip install --no-cache-dir --break-system-packages \
--upgrade pip setuptools wheel && \
python3 -m pip install --no-cache-dir --break-system-packages \
PyYAML requests
# Link python3 to python
RUN ln -s $(which python3) /usr/bin/python
RUN wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.18.4/makerom-v0.18.4-ubuntu_x86_64.zip
RUN unzip makerom-v0.18.4-ubuntu_x86_64.zip -d $DEVKITPRO/tools/bin/
RUN chmod +x $DEVKITPRO/tools/bin/makerom
RUN wget https://github.com/diasurgical/bannertool/releases/download/1.2.0/bannertool.zip
RUN unzip bannertool.zip -d ./
RUN cp ./linux-x86_64/bannertool $DEVKITPRO/tools/bin/
COPY ./docker-entrypoint.sh ./
# Clean package cache and list
RUN rm -rf /var/cache/apt/archives /var/lib/apt/lists/*
RUN rm makerom-v0.18.4-ubuntu_x86_64.zip bannertool.zip
WORKDIR /build/source
RUN chmod +x /build/docker-entrypoint.sh
ENTRYPOINT [ "/build/docker-entrypoint.sh" ]