the start of a Dockerfile for a sapsailing Docker image

This commit is contained in:
Axel Uhl
2018-11-22 20:28:15 +01:00
parent bc76da1e88
commit 52fdf59012
3 changed files with 24 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
Dockerfile
*.tar.gz
+10
View File
@@ -0,0 +1,10 @@
FROM openjdk:11
LABEL maintainer=axel.uhl@sap.com
# Download and extract the release
WORKDIR /home/sailing/servers/server
RUN apt-get update \
&& apt-get install -y wget \
&& wget -O /tmp/RELEASE.tar.gz http://releases.sapsailing.com/RELEASE/RELEASE.tar.gz \
&& tar xzvpf /tmp/RELEASE.tar.gz \
&& rm /tmp/RELEASE.tar.gz
EXPOSE 8888
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
release=$1
if [ "$release" = "" ]; then
INDEX=`mktemp index_XXXX.html`
echo Tempfile for index.html is $INDEX
wget -O $INDEX http://releases.sapsailing.com/
release=$(cat $INDEX | grep build- | tail -1 | sed -e 's/^.*\(build-[0-9]*\).*$/\1/')
rm $INDEX
echo Latest release is $release
fi
cat Dockerfile.tpl | sed -e "s/RELEASE/${release}/g" >Dockerfile
docker build -t sapsailing:$release .