Compare commits

...

3 Commits

Author SHA1 Message Date
Bryan Joshua Pedini 388ba26296 updated go versions 2024-04-18 15:57:50 +02:00
Bryan Joshua Pedini c5d7ae2e96 variabilized build script, added makefile
make is good, make is life, use make
2024-04-18 15:43:37 +02:00
Bryan Joshua Pedini 8533c8bf5c added license section in readme, updated license years 2024-04-17 17:58:42 +02:00
7 changed files with 42 additions and 11 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=bryanpedini
export IMAGE=gobuilder

View File

@ -1,4 +1,4 @@
# Copyright (c) 2022 Bryan Joshua Pedini
# Copyright (c) 2022-2024 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details
ARG GO_VERSION "$GO_VERSION"

View File

@ -1,6 +1,6 @@
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
of this software and associated documentation files (the "Software"), to deal

View File

@ -8,3 +8,17 @@ Image based on official Golang as base, with Git on top (why don't they include
- [1.18.6-alpine3.16](https://github.com/docker-library/golang/blob/2a6ba509d511d58eeb14b81888133745bfe7ef5b/1.18/alpine3.16/Dockerfile)
- [1.19.1-alpine3.15](https://github.com/docker-library/golang/blob/5457a34ddb2e2b59d72069d061187089553d3c1c/1.19/alpine3.15/Dockerfile)
- [1.19.1-alpine3.16](https://github.com/docker-library/golang/blob/5457a34ddb2e2b59d72069d061187089553d3c1c/1.19/alpine3.16/Dockerfile)
- [1.19.13-alpine3.17](https://github.com/docker-library/golang/blob/18778673d05af968094fe71d45dfd7fbf1856b65/1.19/alpine3.17/Dockerfile)
- [1.19.13-alpine3.18](https://github.com/docker-library/golang/blob/18778673d05af968094fe71d45dfd7fbf1856b65/1.19/alpine3.18/Dockerfile)
- [1.20.12-alpine3.17](https://github.com/docker-library/golang/blob/339da23255a9dc00f7921fca9a022f6b95843358/1.20/alpine3.17/Dockerfile)
- [1.20.12-alpine3.18](https://github.com/docker-library/golang/blob/339da23255a9dc00f7921fca9a022f6b95843358/1.20/alpine3.18/Dockerfile)
- [1.21.5-alpine3.17](https://github.com/docker-library/golang/blob/d106c8658abc0975bcd2d8a68a8f4ca85b04a93a/1.21/alpine3.17/Dockerfile)
- [1.21.5-alpine3.18](https://github.com/docker-library/golang/blob/d106c8658abc0975bcd2d8a68a8f4ca85b04a93a/1.21/alpine3.18/Dockerfile)
- [1.21.9-alpine3.18](https://github.com/docker-library/golang/blob/8e88a7ff80459c7663355a7597aae18097fefc93/1.21/alpine3.18/Dockerfile)
- [1.21.9-alpine3.19](https://github.com/docker-library/golang/blob/8e88a7ff80459c7663355a7597aae18097fefc93/1.21/alpine3.19/Dockerfile)
- [1.22.2-alpine3.18](https://github.com/docker-library/golang/blob/ea6bbce8c9b13acefed0f5507336be01f0918f97/1.22/alpine3.18/Dockerfile)
- [1.22.2-alpine3.19](https://github.com/docker-library/golang/blob/ea6bbce8c9b13acefed0f5507336be01f0918f97/1.22/alpine3.19/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
set -e
# Copyright (c) 2022 Bryan Joshua Pedini
# Copyright (c) 2022-2024 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details
REGEX="^[ ]*(#.*)?$"
while read -r VERSION; do
if [[ ! "${VERSION}" =~ $REGEX ]]; then
docker pull golang:${VERSION}
docker build --force-rm --build-arg GO_VERSION=${VERSION} -t bryanpedini/gobuilder:${VERSION} .
docker push bryanpedini/gobuilder:${VERSION}
docker image rm bryanpedini/gobuilder:${VERSION} golang:${VERSION}
docker build --force-rm --build-arg GO_VERSION=${VERSION} -t ${REGISTRY}/${IMAGE}:${VERSION} .
docker push ${REGISTRY}/${IMAGE}:${VERSION}
docker image rm ${REGISTRY}/${IMAGE}:${VERSION} golang:${VERSION}
fi
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,9 @@
# Copyright (c) 2022 Bryan Joshua Pedini
# Copyright (c) 2022-2024 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details
1.19.13-alpine3.17
1.19.13-alpine3.18
1.20.12-alpine3.17
1.20.12-alpine3.18
1.21.5-alpine3.17
1.21.5-alpine3.18
1.21.9-alpine3.18
1.21.9-alpine3.19
1.22.2-alpine3.18
1.22.2-alpine3.19