mirror of
https://github.com/dockersrc/scripts
synced 2024-11-21 17:23:06 -05:00
a01a01d978
configs/homepage/widgets.yaml dockerfile/nginx htdocs/cgi-bin/env.php htdocs/www/index.php htdocs/www/info.php init/bin/buildah-build init/bin/ddns init/bin/docker-buildx init/setup/deno-init.sh LICENSE.md
43 lines
1.6 KiB
Bash
Executable File
43 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# shellcheck shell=bash
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
##@Version : 202303142021-git
|
|
# @@Author : Jason Hempstead
|
|
# @@Contact : jason@casjaysdev.pro
|
|
# @@License : LICENSE.md
|
|
# @@ReadME : build-project --help
|
|
# @@Copyright : Copyright: (c) 2023 Jason Hempstead, Casjays Developments
|
|
# @@Created : Tuesday, Mar 14, 2023 20:21 EDT
|
|
# @@File : build-project
|
|
# @@Description :
|
|
# @@Changelog : New script
|
|
# @@TODO : Better documentation
|
|
# @@Other :
|
|
# @@Resource :
|
|
# @@Terminal App : no
|
|
# @@sudo/root : no
|
|
# @@Template : shell/sh
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
HOME="${USER_HOME:-$HOME}"
|
|
USER="${SUDO_USER:-$USER}"
|
|
RUN_USER="${SUDO_USER:-$USER}"
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# Export variables
|
|
WORKDIR="${WORKDIR:-/data/build}"
|
|
BUILDAH_ISOLATION="${BUILDAH_ISOLATION:-chroot}"
|
|
PLATFORMS="${PLATFORMS:---platform=linux/amd64,linux/arm64}"
|
|
DOCKER_FILE="${*:-$(find "$WORKDIR" -maxdepth 10 -name 'Dockerfile*' 2>/dev/null | grep '^' || false)}"
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# Main application
|
|
if [ -n "$DOCKER_FILE" ]; then
|
|
for file in $DOCKER_FILE; do
|
|
buildah build $PLATFORMS "$file"
|
|
done
|
|
else
|
|
echo "Can not find any dockerfiles in /data/build"
|
|
exit 1
|
|
fi
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# End application
|
|
# ex: ts=2 sw=2 et filetype=sh
|