Add tag based on folder

This commit is contained in:
2022-12-05 13:41:51 +02:00
parent 852421b134
commit 09f0c4c2e0
7 changed files with 388 additions and 10 deletions

View File

@@ -1,9 +1,17 @@
#!/usr/bin/env bash
#!/bin/bash
if [ $# -eq 0 ]
then
tag='latest'
else
tag=$1
fi
if [ $tag != 'latest' ]
then
echo 'Build from from tag'
docker build -f docker/${tag}/Dockerfile -t jkaninda/laravel-php-fpm:$tag .
else
echo 'Build latest'
docker build -f docker/8.1/Dockerfile -t jkaninda/laravel-php-fpm:$tag .
fi
docker build -t jkaninda/laravel-php-fpm:$tag .