Compare commits

...

6 Commits

7 changed files with 53 additions and 16 deletions

7
.makeVars Normal file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2024 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details
export REGISTRY=git.bjphoster.com/docker
export IMAGE=gobuilder

View File

@@ -1,6 +1,6 @@
# Copyright (c) 2022 Bryan Joshua Pedini # Copyright (c) 2022-2024 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details # License: MIT · see LICENSE file for more details
ARG GO_VERSION "$GO_VERSION" ARG GO_VERSION=alpine
FROM golang:${GO_VERSION} FROM golang:${GO_VERSION}

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2022 Bryan Joshua Pedini Copyright (c) 2022-2024 Bryan Joshua Pedini
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -4,7 +4,19 @@ Image based on official Golang as base, with Git on top (why don't they include
# Tags: # Tags:
- [1.17.13-alpine3.15](https://github.com/docker-library/golang/blob/db9cd9d03a82276dba00e1c2df901b411a2e351e/1.17/alpine3.15/Dockerfile) - [1.17.13-alpine3.15](https://github.com/docker-library/golang/blob/db9cd9d03a82276dba00e1c2df901b411a2e351e/1.17/alpine3.15/Dockerfile)
- [1.17.13-alpine3.16](https://github.com/docker-library/golang/blob/db9cd9d03a82276dba00e1c2df901b411a2e351e/1.17/alpine3.16/Dockerfile) - [1.17.13-alpine3.16](https://github.com/docker-library/golang/blob/db9cd9d03a82276dba00e1c2df901b411a2e351e/1.17/alpine3.16/Dockerfile)
- [1.18.6-alpine3.15](https://github.com/docker-library/golang/blob/2a6ba509d511d58eeb14b81888133745bfe7ef5b/1.18/alpine3.15/Dockerfile) - [1.18.10-alpine3.16](https://github.com/docker-library/golang/blob/f28358ce7460e4b8fe0c5ef7c1c4cc54f0f6ea15/1.18/alpine3.16/Dockerfile)
- [1.18.6-alpine3.16](https://github.com/docker-library/golang/blob/2a6ba509d511d58eeb14b81888133745bfe7ef5b/1.18/alpine3.16/Dockerfile) - [1.18.10-alpine3.17](https://github.com/docker-library/golang/blob/f28358ce7460e4b8fe0c5ef7c1c4cc54f0f6ea15/1.18/alpine3.17/Dockerfile)
- [1.19.1-alpine3.15](https://github.com/docker-library/golang/blob/5457a34ddb2e2b59d72069d061187089553d3c1c/1.19/alpine3.15/Dockerfile) - [1.19.13-alpine3.17](https://github.com/docker-library/golang/blob/18778673d05af968094fe71d45dfd7fbf1856b65/1.19/alpine3.17/Dockerfile)
- [1.19.1-alpine3.16](https://github.com/docker-library/golang/blob/5457a34ddb2e2b59d72069d061187089553d3c1c/1.19/alpine3.16/Dockerfile) - [1.19.13-alpine3.18](https://github.com/docker-library/golang/blob/18778673d05af968094fe71d45dfd7fbf1856b65/1.19/alpine3.18/Dockerfile)
- [1.20.14-alpine3.18](https://github.com/docker-library/golang/blob/b979efaabcc5b7ca012ba608cd0eaf4df8ef7f66/1.20/alpine3.18/Dockerfile)
- [1.20.14-alpine3.19](https://github.com/docker-library/golang/blob/b979efaabcc5b7ca012ba608cd0eaf4df8ef7f66/1.20/alpine3.19/Dockerfile)
- [1.21.13-alpine3.19](https://github.com/docker-library/golang/blob/aaed3270d35c8a4c8378d72a380890bafffcbec6/1.21/alpine3.19/Dockerfile)
- [1.21.13-alpine3.20](https://github.com/docker-library/golang/blob/aaed3270d35c8a4c8378d72a380890bafffcbec6/1.21/alpine3.20/Dockerfile)
- [1.22.7-alpine3.19](https://github.com/docker-library/golang/blob/9e123d9969e8e6bd266c50ab3a44920719902c49/1.22/alpine3.19/Dockerfile)
- [1.22.7-alpine3.20](https://github.com/docker-library/golang/blob/9e123d9969e8e6bd266c50ab3a44920719902c49/1.22/alpine3.20/Dockerfile)
- [1.23.1-alpine3.19](https://github.com/docker-library/golang/blob/724988cd7e877c42252631f262420cc7d97abc9e/1.23/alpine3.19/Dockerfile)
- [1.23.1-alpine3.20](https://github.com/docker-library/golang/blob/724988cd7e877c42252631f262420cc7d97abc9e/1.23/alpine3.20/Dockerfile)
# License:
Copyright (c) 2022-2024 Bryan Joshua Pedini<br>
License: MIT · see [LICENSE](LICENSE) file for more details

8
build.sh Normal file → Executable file
View File

@@ -1,15 +1,15 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
# Copyright (c) 2022 Bryan Joshua Pedini # Copyright (c) 2022-2024 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details # License: MIT · see LICENSE file for more details
REGEX="^[ ]*(#.*)?$" REGEX="^[ ]*(#.*)?$"
while read -r VERSION; do while read -r VERSION; do
if [[ ! "${VERSION}" =~ $REGEX ]]; then if [[ ! "${VERSION}" =~ $REGEX ]]; then
docker pull golang:${VERSION} docker pull golang:${VERSION}
docker build --force-rm --build-arg GO_VERSION=${VERSION} -t bryanpedini/gobuilder:${VERSION} . docker build --force-rm --build-arg GO_VERSION=${VERSION} -t ${REGISTRY}/${IMAGE}:${VERSION} .
docker push bryanpedini/gobuilder:${VERSION} docker push ${REGISTRY}/${IMAGE}:${VERSION}
docker image rm bryanpedini/gobuilder:${VERSION} golang:${VERSION} docker image rm ${REGISTRY}/${IMAGE}:${VERSION} golang:${VERSION}
fi fi
done < versionlist done < versionlist

10
makefile Normal file
View File

@@ -0,0 +1,10 @@
#!make
include .makeVars
# Copyright (c) 2024 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details
default: build
build:
bash -c "./build.sh"

View File

@@ -1,9 +1,17 @@
# Copyright (c) 2022 Bryan Joshua Pedini # Copyright (c) 2022-2024 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details # License: MIT · see LICENSE file for more details
1.17.13-alpine3.15
1.17.13-alpine3.16
1.18.10-alpine3.16
1.18.10-alpine3.17
1.19.13-alpine3.17 1.19.13-alpine3.17
1.19.13-alpine3.18 1.19.13-alpine3.18
1.20.12-alpine3.17 1.20.14-alpine3.18
1.20.12-alpine3.18 1.20.14-alpine3.19
1.21.5-alpine3.17 1.21.13-alpine3.19
1.21.5-alpine3.18 1.21.13-alpine3.20
1.22.7-alpine3.19
1.22.7-alpine3.20
1.23.1-alpine3.19
1.23.1-alpine3.20