From 0a92f74ced5ec31c81f7980d3372529a54c2f7a6 Mon Sep 17 00:00:00 2001 From: flounder5 <25795672+flounder5@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:29:40 -0500 Subject: [PATCH] Added issues section to README. Made 2 variables global so they can be specified in the environment. --- README.md | 7 +++++++ docker/Dockerfile | 1 - src/dockerBuild.sh | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d9d5746..f53fe4d 100644 --- a/README.md +++ b/README.md @@ -153,3 +153,10 @@ jobs: run: make docker_tag TAG="${{github.ref_name}}" if: ${{ github.ref_type == 'tag' }} ``` + +## Issues/Shortcomings +1. The Docker image is hard-coded to a specific version of Docker. Typically the entire product/project tracks a single version, so odds are that the version currently specified in this project is not going to map. Need to figure out the best way around that and provide examples. + 2. Maybe pull Docker out of the builder-docker image. Then end-user creates a custom image `FROM flounder5/builder-docker:version` , and then installs their desired version. In this scenario end-user could also specify DOCKER_REGISTRY value so that all users are pushing to same registry. + +## License +Distributed under the MIT License. See `LICENSE.txt` for more information. \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index ebdf5ad..b7b4258 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,7 +2,6 @@ FROM ubuntu:22.04 ARG DOCKER_VERSION=5:24.0.7-1~ubuntu.22.04~jammy ARG BUILDX_VERSION=0.11.2-1~ubuntu.22.04~jammy -ARG TARGETPLATFORM RUN \ # Add Docker's official GPG key: diff --git a/src/dockerBuild.sh b/src/dockerBuild.sh index 433936b..6d5e5b9 100755 --- a/src/dockerBuild.sh +++ b/src/dockerBuild.sh @@ -1,6 +1,8 @@ #!/bin/bash -MAIN_BRANCH="main" +# Globals that can be overwritten eith environment variables as needed +DOCKER_REGISTRY="${DOCKER_REGISTRY}" +MAIN_BRANCH="${MAIN_BRANCH}:-main" function dockerBuildUsage { @@ -74,7 +76,6 @@ function build # Builds and tags a docker image. function dockerBuild { - local DOCKER_REGISTRY="" local DOCKER_REPO="" local BUILD_CONTEXT_DIR="" local DOCKER_FILE="" @@ -267,5 +268,4 @@ function dockerBuildStandardTag dockerBuild -c "." -f "./docker/Dockerfile" -g "." -n -o -t "$TAG" "${@}" } -#Allows function calls based on arguments passed to the script "$@"