Compare commits

...

13 Commits

Author SHA1 Message Date
0f80d3aa3a added newwer Go versions, deprecated old ones 2024-09-24 17:13:58 +02:00
ec939cb000 moved to gitea registry 2024-09-24 16:45:41 +02:00
05fcc13d60 fixed docker warning for empty from possibility 2024-09-24 16:44:30 +02:00
388ba26296 updated go versions 2024-04-18 15:57:50 +02:00
c5d7ae2e96 variabilized build script, added makefile
make is good, make is life, use make
2024-04-18 15:43:37 +02:00
8533c8bf5c added license section in readme, updated license years 2024-04-17 17:58:42 +02:00
025d79f309 fixed build.sh image removal
in recent versions of docker the parent image is not saved as a tag when building
to handle both whom has the official golang image saved and whom is using only to build,
now the scripts pulls (and tags) the official image so that the rm command does not fail
2023-12-06 09:41:44 +01:00
04f6f8372c updated Go versions 2023-12-06 00:12:34 +01:00
009de0ef95 updated Go versions 2022-09-09 10:20:44 +02:00
9aff449a8e fixed tags formatting in README.md 2022-03-27 14:27:06 +02:00
599ae468ee added tags in README.md 2022-03-27 14:26:10 +02:00
e83a1dc2b8 added automatic build and deployment script 2022-03-27 14:18:10 +02:00
17af235dca added Dockerfile 2022-03-27 14:17:47 +02:00
7 changed files with 78 additions and 1 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

8
Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
# Copyright (c) 2022-2024 Bryan Joshua Pedini
# License: MIT · see LICENSE file for more details
ARG GO_VERSION=alpine
FROM golang:${GO_VERSION}
RUN apk add --no-cache git; \
rm -rf /var/cache/apk

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

@@ -1,2 +1,22 @@
# GoBuilder # GoBuilder
Image based on official Golang as base, with Git on top (why don't they include it by default?) Image based on official Golang as base, with Git on top (why don't they include it by default?)
# Tags:
- [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.18.10-alpine3.16](https://github.com/docker-library/golang/blob/f28358ce7460e4b8fe0c5ef7c1c4cc54f0f6ea15/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.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.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

15
build.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
# 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 ${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"

17
versionlist Normal file
View File

@@ -0,0 +1,17 @@
# Copyright (c) 2022-2024 Bryan Joshua Pedini
# 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.18
1.20.14-alpine3.18
1.20.14-alpine3.19
1.21.13-alpine3.19
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