Commit 1c52f431 authored by Felix Haase's avatar Felix Haase
Browse files

add docker build

parent c21ae70c
No related merge requests found
Showing with 66 additions and 1 deletion
+66 -1
.dockerignore 0 → 100644
/out/
JBox2d.log
/bin/
ABSoftware.jar
/ad_hider_plugin/
/measurements/
doc
Dockerfile
.gitignore
.git
**/*.class
\ No newline at end of file
Dockerfile 0 → 100644
FROM openjdk:8-jdk-bullseye as build
ENV ANT_VERSION=1.10.12
ENV ANT_HOME=/opt/ant
WORKDIR /tmp
RUN wget --no-check-certificate --no-cookies http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz \
&& wget --no-check-certificate --no-cookies http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz.sha512 \
&& echo "$(cat apache-ant-${ANT_VERSION}-bin.tar.gz.sha512) apache-ant-${ANT_VERSION}-bin.tar.gz" | sha512sum -c \
&& tar -zvxf apache-ant-${ANT_VERSION}-bin.tar.gz -C /opt/ \
&& ln -s /opt/apache-ant-${ANT_VERSION} /opt/ant \
&& rm -f apache-ant-${ANT_VERSION}-bin.tar.gz \
&& rm -f apache-ant-${ANT_VERSION}-bin.tar.gz.sha512
# add executables to path
RUN update-alternatives --install "/usr/bin/ant" "ant" "/opt/ant/bin/ant" 1 && \
update-alternatives --set "ant" "/opt/ant/bin/ant"
WORKDIR /opt/datalab/
COPY . /opt/datalab/
RUN ant jar
FROM openjdk:8-jre-bullseye
LABEL maintainer="Felix Haase <felix.haase@stud.uni-bammberg.de>"
COPY --from=build /opt/datalab/ABSoftware.jar /opt/datalab/ABSoftware.jar
COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT [ "/docker-entrypoint.sh" ]
CMD ["java", "-jar", "/opt/datalab/ABSoftware.jar"]
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</target> </target>
<target name="jar"> <target name="jar" depends="compile">
<jar destfile="ABSoftware.jar"> <jar destfile="ABSoftware.jar">
<manifest> <manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/> <attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
......
#!/bin/sh
if [ "$1" = "java" ]; then
SERVER_HOST=${SERVER_HOST:-abserver}
SERVER_TYPE=${SERVER_TYPE:-ANGRY_BIRDS}
if [ "$SERVER_TYPE" != "ANGRY_BIRDS" ]; then
echo "only ANGRY_BIRDS supported"
exit 1
fi
TEAM_ID=${TEAM_ID:-1337}
exec "$@" ${SERVER_HOST} ${TEAM_ID}
else
exec "$@"
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment