Skip to content

Go

The corresponding FreeBSD14.3p5-amd64 images are available on Github, DockerHub and Quay. CI/CD pipelines will soon add amd64/aarch64 support for 15.0, 14.snap, 15.snap and 16.snap.

images/14.3/golang/1.25/Containerfile

#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM ghcr.io/matias-pizarro/freebsd-oci-containers/freebsd-zfs:14.3

ENV PATH /usr/local/go/bin:$PATH

ENV GOLANG_VERSION 1.25.4
ENV PORT_VERSION 1.25.4_0

RUN set -eux; \
    /usr/bin/env pkg install -yr FreeBSD-ports \
    lang/go125; \
    for src in $(ls /usr/local/go125/bin); do \
        ln -sv "/usr/local/go125/bin/$src" "/usr/local/bin/"; \
    done; \
# smoke test
    go version; \
    go125 version; \
    /bin/rm -rf /var/db/pkg/*; \
    /bin/rm -f /var/cache/pkg/*

# don't auto-upgrade the gotoolchain
# https://github.com/docker-library/golang/issues/472
ENV GOTOOLCHAIN=local

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go125/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH"
WORKDIR $GOPATH

images/14.3/golang/1.25/build.sh

podman build \
    --env IGNORE_OSVERSION=yes \
    --env ABI=FreeBSD:14:$(sysctl -n hw.machine_arch) \
    --env OSVERSION=1403000 \
    --env VERSION_MINOR=3 \
    --no-hosts \
    --tag golang:1-freebsd \
    --tag golang:1-freebsd14 \
    --tag golang:1-freebsd14.3 \
    --tag golang:1.25-freebsd \
    --tag golang:1.25-freebsd14 \
    --tag golang:1.25-freebsd14.3 \
    --tag golang:1.25.4-freebsd \
    --tag golang:1.25.4-freebsd14 \
    --tag golang:1.25.4-freebsd14.3 \
    --tag golang:freebsd \
    --tag golang:freebsd14 \
    --tag golang:freebsd14.3 \
    --file Containerfile

images/14.3/golang/1.25/test.sh

# TBD: smoke test of built images

podman run -it --rm \
    ghcr.io/matias-pizarro/freebsd-oci-containers/nginx:freebsd nginx -v

images/14.3/golang/1.25/push.sh

# Github
echo
echo "################################################################################"
IMAGE_PATH="ghcr.io/matias-pizarro/freebsd-oci-containers"
echo "Pushing golang-1.25.4 to ${IMAGE_PATH}"

echo
echo "golang:1-freebsd"
podman tag localhost/golang:1-freebsd "${IMAGE_PATH}"/golang:1-freebsd
podman push "${IMAGE_PATH}"/golang:1-freebsd

echo
echo "golang:1-freebsd14"
podman tag localhost/golang:1-freebsd14 "${IMAGE_PATH}"/golang:1-freebsd14
podman push "${IMAGE_PATH}"/golang:1-freebsd14

echo
echo "golang:1-freebsd14.3"
podman tag localhost/golang:1-freebsd14.3 "${IMAGE_PATH}"/golang:1-freebsd14.3
podman push "${IMAGE_PATH}"/golang:1-freebsd14.3

echo
echo "golang:1.25-freebsd"
podman tag localhost/golang:1.25-freebsd "${IMAGE_PATH}"/golang:1.25-freebsd
podman push "${IMAGE_PATH}"/golang:1.25-freebsd

echo
echo "golang:1.25-freebsd14"
podman tag localhost/golang:1.25-freebsd14 "${IMAGE_PATH}"/golang:1.25-freebsd14
podman push "${IMAGE_PATH}"/golang:1.25-freebsd14

echo
echo "golang:1.25-freebsd14.3"
podman tag localhost/golang:1.25-freebsd14.3 "${IMAGE_PATH}"/golang:1.25-freebsd14.3
podman push "${IMAGE_PATH}"/golang:1.25-freebsd14.3

echo
echo "golang:1.25.4-freebsd"
podman tag localhost/golang:1.25.4-freebsd "${IMAGE_PATH}"/golang:1.25.4-freebsd
podman push "${IMAGE_PATH}"/golang:1.25.4-freebsd

echo
echo "golang:1.25.4-freebsd14"
podman tag localhost/golang:1.25.4-freebsd14 "${IMAGE_PATH}"/golang:1.25.4-freebsd14
podman push "${IMAGE_PATH}"/golang:1.25.4-freebsd14

echo
echo "golang:1.25.4-freebsd14.3"
podman tag localhost/golang:1.25.4-freebsd14.3 "${IMAGE_PATH}"/golang:1.25.4-freebsd14.3
podman push "${IMAGE_PATH}"/golang:1.25.4-freebsd14.3

echo
echo "golang:freebsd"
podman tag localhost/golang:freebsd "${IMAGE_PATH}"/golang:freebsd
podman push "${IMAGE_PATH}"/golang:freebsd

echo
echo "golang:freebsd14"
podman tag localhost/golang:freebsd14 "${IMAGE_PATH}"/golang:freebsd14
podman push "${IMAGE_PATH}"/golang:freebsd14

echo
echo "golang:freebsd14.3"
podman tag localhost/golang:freebsd14.3 "${IMAGE_PATH}"/golang:freebsd14.3
podman push "${IMAGE_PATH}"/golang:freebsd14.3


# Docker
echo
echo "################################################################################"
IMAGE_PATH="docker.io/matiaspizarro"
echo "Pushing golang-1.25.4 to ${IMAGE_PATH}"

echo
echo "golang:1-freebsd"
podman tag localhost/golang:1-freebsd "${IMAGE_PATH}"/golang:1-freebsd
podman push "${IMAGE_PATH}"/golang:1-freebsd

echo
echo "golang:1-freebsd14"
podman tag localhost/golang:1-freebsd14 "${IMAGE_PATH}"/golang:1-freebsd14
podman push "${IMAGE_PATH}"/golang:1-freebsd14

echo
echo "golang:1-freebsd14.3"
podman tag localhost/golang:1-freebsd14.3 "${IMAGE_PATH}"/golang:1-freebsd14.3
podman push "${IMAGE_PATH}"/golang:1-freebsd14.3

echo
echo "golang:1.25-freebsd"
podman tag localhost/golang:1.25-freebsd "${IMAGE_PATH}"/golang:1.25-freebsd
podman push "${IMAGE_PATH}"/golang:1.25-freebsd

echo
echo "golang:1.25-freebsd14"
podman tag localhost/golang:1.25-freebsd14 "${IMAGE_PATH}"/golang:1.25-freebsd14
podman push "${IMAGE_PATH}"/golang:1.25-freebsd14

echo
echo "golang:1.25-freebsd14.3"
podman tag localhost/golang:1.25-freebsd14.3 "${IMAGE_PATH}"/golang:1.25-freebsd14.3
podman push "${IMAGE_PATH}"/golang:1.25-freebsd14.3

echo
echo "golang:1.25.4-freebsd"
podman tag localhost/golang:1.25.4-freebsd "${IMAGE_PATH}"/golang:1.25.4-freebsd
podman push "${IMAGE_PATH}"/golang:1.25.4-freebsd

echo
echo "golang:1.25.4-freebsd14"
podman tag localhost/golang:1.25.4-freebsd14 "${IMAGE_PATH}"/golang:1.25.4-freebsd14
podman push "${IMAGE_PATH}"/golang:1.25.4-freebsd14

echo
echo "golang:1.25.4-freebsd14.3"
podman tag localhost/golang:1.25.4-freebsd14.3 "${IMAGE_PATH}"/golang:1.25.4-freebsd14.3
podman push "${IMAGE_PATH}"/golang:1.25.4-freebsd14.3

echo
echo "golang:freebsd"
podman tag localhost/golang:freebsd "${IMAGE_PATH}"/golang:freebsd
podman push "${IMAGE_PATH}"/golang:freebsd

echo
echo "golang:freebsd14"
podman tag localhost/golang:freebsd14 "${IMAGE_PATH}"/golang:freebsd14
podman push "${IMAGE_PATH}"/golang:freebsd14

echo
echo "golang:freebsd14.3"
podman tag localhost/golang:freebsd14.3 "${IMAGE_PATH}"/golang:freebsd14.3
podman push "${IMAGE_PATH}"/golang:freebsd14.3


# Quay
echo
echo "################################################################################"
IMAGE_PATH="quay.io/matiaspizarro"
echo "Pushing golang-1.25.4 to ${IMAGE_PATH}"

echo
echo "golang:1-freebsd"
podman tag localhost/golang:1-freebsd "${IMAGE_PATH}"/golang:1-freebsd
podman push "${IMAGE_PATH}"/golang:1-freebsd

echo
echo "golang:1-freebsd14"
podman tag localhost/golang:1-freebsd14 "${IMAGE_PATH}"/golang:1-freebsd14
podman push "${IMAGE_PATH}"/golang:1-freebsd14

echo
echo "golang:1-freebsd14.3"
podman tag localhost/golang:1-freebsd14.3 "${IMAGE_PATH}"/golang:1-freebsd14.3
podman push "${IMAGE_PATH}"/golang:1-freebsd14.3

echo
echo "golang:1.25-freebsd"
podman tag localhost/golang:1.25-freebsd "${IMAGE_PATH}"/golang:1.25-freebsd
podman push "${IMAGE_PATH}"/golang:1.25-freebsd

echo
echo "golang:1.25-freebsd14"
podman tag localhost/golang:1.25-freebsd14 "${IMAGE_PATH}"/golang:1.25-freebsd14
podman push "${IMAGE_PATH}"/golang:1.25-freebsd14

echo
echo "golang:1.25-freebsd14.3"
podman tag localhost/golang:1.25-freebsd14.3 "${IMAGE_PATH}"/golang:1.25-freebsd14.3
podman push "${IMAGE_PATH}"/golang:1.25-freebsd14.3

echo
echo "golang:1.25.4-freebsd"
podman tag localhost/golang:1.25.4-freebsd "${IMAGE_PATH}"/golang:1.25.4-freebsd
podman push "${IMAGE_PATH}"/golang:1.25.4-freebsd

echo
echo "golang:1.25.4-freebsd14"
podman tag localhost/golang:1.25.4-freebsd14 "${IMAGE_PATH}"/golang:1.25.4-freebsd14
podman push "${IMAGE_PATH}"/golang:1.25.4-freebsd14

echo
echo "golang:1.25.4-freebsd14.3"
podman tag localhost/golang:1.25.4-freebsd14.3 "${IMAGE_PATH}"/golang:1.25.4-freebsd14.3
podman push "${IMAGE_PATH}"/golang:1.25.4-freebsd14.3

echo
echo "golang:freebsd"
podman tag localhost/golang:freebsd "${IMAGE_PATH}"/golang:freebsd
podman push "${IMAGE_PATH}"/golang:freebsd

echo
echo "golang:freebsd14"
podman tag localhost/golang:freebsd14 "${IMAGE_PATH}"/golang:freebsd14
podman push "${IMAGE_PATH}"/golang:freebsd14

echo
echo "golang:freebsd14.3"
podman tag localhost/golang:freebsd14.3 "${IMAGE_PATH}"/golang:freebsd14.3
podman push "${IMAGE_PATH}"/golang:freebsd14.3

Supported tags and respective Containerfile links

images/14.3/golang/1.25/LICENSE

BSD 2-Clause License

Copyright (c) Matías Pizarro

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.