Skip to content

Commit

Permalink
Added issues section to README. Made 2 variables global so they can b…
Browse files Browse the repository at this point in the history
…e specified in the environment.
  • Loading branch information
flounderpinto committed Dec 15, 2023
1 parent f9c4832 commit 0a92f74
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 0 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions src/dockerBuild.sh
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down Expand Up @@ -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=""
Expand Down Expand Up @@ -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
"$@"

0 comments on commit 0a92f74

Please sign in to comment.