Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
AI Birds
DataLab
Commits
1c52f431
Commit
1c52f431
authored
2 years ago
by
Felix Haase
Browse files
Options
Download
Patches
Plain Diff
add docker build
parent
c21ae70c
master
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.dockerignore
+11
-0
.dockerignore
Dockerfile
+36
-0
Dockerfile
build.xml
+1
-1
build.xml
docker-entrypoint.sh
+18
-0
docker-entrypoint.sh
with
66 additions
and
1 deletion
+66
-1
.dockerignore
0 → 100644
+
11
−
0
View file @
1c52f431
/out/
JBox2d.log
/bin/
ABSoftware.jar
/ad_hider_plugin/
/measurements/
doc
Dockerfile
.gitignore
.git
**/*.class
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
36
−
0
View file @
1c52f431
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
This diff is collapsed.
Click to expand it.
build.xml
+
1
−
1
View file @
1c52f431
...
@@ -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"
/>
...
...
This diff is collapsed.
Click to expand it.
docker-entrypoint.sh
0 → 100755
+
18
−
0
View file @
1c52f431
#!/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
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets