1 # ---------------------------------------------------------------------------
3 # Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
4 # ---------------------------------------------------------------------------
5 # SquirrelJME is under the GNU General Public License v3+, or later.
6 # See license.mkd for licensing and copyright information.
7 # ---------------------------------------------------------------------------
9 # We need the entire JDK here for this to work!
10 FROM openjdk:8-jdk AS build
12 # emulator-base uses JNI to provide Assembly methods, we need a C++ compiler
14 RUN apt-get install -y build-essential g++
16 # Copy repository for building and use it for building
20 # Build entire JAR distribution (we do not need a daemon here)
21 RUN ./gradlew --no-daemon jar
23 # We do not need a big complex environment to run SquirrelJME now, so we
24 # can use a more compact image here
28 LABEL cc.squirreljme.vm="springcoat"
29 LABEL cc.squirreljme.version="0.3.0"
31 LABEL description="SquirrelJME is a Java ME 8 Virtual Machine for embedded and Internet of Things devices. It has the ultimate goal of being 99.9% compatible with the Java ME standard."
32 LABEL maintainer="Stephanie Gawroriski <xerthesquirrel@gmail.com>"
34 # All of the SquirrelJME data is here
35 RUN mkdir /squirreljme
37 # SquirrelJME system JARs
38 RUN mkdir /squirreljme/system
39 COPY --from=build /tmp/src/modules/*/build/libs/*.jar /squirreljme/system/
41 # SquirrelJME emulator support
42 RUN mkdir /squirreljme/emulator
43 COPY --from=build /tmp/src/emulators/*/build/libs/*.jar /squirreljme/emulator/
45 # Where the user classpath exists (to run extra programs)
46 RUN mkdir /squirreljme/jars
47 VOLUME /squirreljme/jars
49 # Expose TelNet (LUI) and VNC (LCDUI)
53 # Run the VM and go to the launcher
55 -classpath "/squirreljme/emulator/*:/squirreljme/system/*" \
56 cc.squirreljme.emulator.vm.VMFactory \
57 -Xemulator:springcoat \
58 -Xlibraries:"/squirreljme/system/*:/squirreljme/jars/*" \
59 -classpath "/squirreljme/system/*" \
60 javax.microedition.midlet.__MainHandler__ \
61 cc.squirreljme.runtime.launcher.Main