forked from Stephane-D/SGDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (28 loc) · 789 Bytes
/
Dockerfile
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
FROM amd64/ubuntu:20.04
# Set-up argument defaults
ARG JDK_VER=11
# Install supporting packages
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
bash \
make \
openjdk-${JDK_VER}-jre-headless \
wine32 \
&& rm -rf /var/lib/apt/lists/*
# Create sgdk unprivileged user
RUN useradd -ms /bin/sh -d /sgdk sgdk
# Set-up SGDK
COPY . /sgdk
ENV GDK=/sgdk
ENV SGDK_DOCKER=y
# Create wrappers to execute .exe files using wine
RUN sed -i 's/\r$//' sgdk/bin/create-bin-wrappers.sh && \
chmod +x sgdk/bin/create-bin-wrappers.sh
RUN sgdk/bin/create-bin-wrappers.sh
# Set-up mount point and make command
VOLUME /src
WORKDIR /src
# Use sgdk user
USER sgdk
ENTRYPOINT [ "make", "-f", "/sgdk/makefile.gen" ]