First version of a Dockerfile generator added

Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>
This commit is contained in:
Dominic Schabel
2018-10-26 23:57:48 +02:00
parent 1bff1feee2
commit 1cbde47370
4 changed files with 144 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -euxo pipefail
#
# Copyright (c) 2018 Bosch Software Innovations GmbH and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
HAWKBIT_VERSION="0.2.4"
MARIADB_DRIVER_VERSION="2.3.0"
BASE_IMAGE="openjdk:8u181-jre-alpine"
##################################################
mkdir -p "../$HAWKBIT_VERSION" && mkdir -p "../$HAWKBIT_VERSION-mysql"
cp ./template/KEY "../$HAWKBIT_VERSION/KEY"
cp ./template/KEY "../$HAWKBIT_VERSION-mysql/KEY"
cp ./template/Dockerfile "../$HAWKBIT_VERSION/Dockerfile"
cp ./template/Dockerfile-mysql "../$HAWKBIT_VERSION-mysql/Dockerfile"
sed -i '' -e "s/{{BASE_IMAGE}}/${BASE_IMAGE}/g; s/{{HAWKBIT_VERSION}}/$HAWKBIT_VERSION/g" "../$HAWKBIT_VERSION/Dockerfile"
sed -i '' -e "s/{{HAWKBIT_VERSION}}/$HAWKBIT_VERSION/g; s/{{MARIADB_DRIVER_VERSION}}/$MARIADB_DRIVER_VERSION/g" "../$HAWKBIT_VERSION-mysql/Dockerfile"