-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
library/golang: Add 1.23-buster support.
- Loading branch information
1 parent
5ade166
commit 9940516
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM lcr.loongnix.cn/library/debian:sid | ||
|
||
# install cgo-related dependencies | ||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
g++ \ | ||
gcc \ | ||
libc6-dev \ | ||
make \ | ||
wget \ | ||
pkg-config \ | ||
; \ | ||
apt-get autoclean all; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PATH /usr/local/go/bin:$PATH | ||
|
||
ENV GOLANG_VERSION 1.23.3 | ||
|
||
RUN set -eux; \ | ||
url='https://go.dev/dl/go1.23.3.linux-loong64.tar.gz'; \ | ||
sha256='1d0161a8946c7d99f717bad23631738408511f9f87e78d852224a023d8882ad8'; \ | ||
wget -O go.tgz "$url" --progress=dot:giga; \ | ||
echo "$sha256 *go.tgz" | sha256sum -c -; \ | ||
tar -C /usr/local -xzf go.tgz; \ | ||
rm go.tgz; \ | ||
go version | ||
|
||
ENV GOPATH /go | ||
ENV PATH $GOPATH/bin:$PATH | ||
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" | ||
WORKDIR $GOPATH | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This file is generated by the template. | ||
|
||
REGISTRY ?= lcr.loongnix.cn | ||
ORGANIZATION ?= library | ||
REPOSITORY ?= golang | ||
TAG ?= 1.23-buster | ||
|
||
IMAGE = $(REGISTRY)/$(ORGANIZATION)/$(REPOSITORY):$(TAG) | ||
ALIAS = $(REGISTRY)/$(ORGANIZATION)/$(REPOSITORY):1.23 | ||
LATEST = $(REGISTRY)/$(ORGANIZATION)/$(REPOSITORY):latest | ||
|
||
default: image | ||
|
||
image: | ||
docker build \ | ||
-t $(IMAGE) \ | ||
. | ||
|
||
push: alias | ||
docker push $(IMAGE) | ||
docker push $(ALIAS) | ||
|
||
ifneq ($(LATEST),) | ||
docker tag $(IMAGE) $(LATEST) | ||
docker push $(LATEST) | ||
endif | ||
|
||
alias: | ||
docker tag $(IMAGE) $(ALIAS) | ||
|