First version of a Dockerfile generator added
Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>
This commit is contained in:
27
hawkbit-runtime/docker/generator/generate.sh
Normal file
27
hawkbit-runtime/docker/generator/generate.sh
Normal 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"
|
||||
Reference in New Issue
Block a user