replace use of docker registry docker.io (hub.docker.com) with self-hosted r.xmox.nl

when setting up the docker organization account for mox it already felt off.
depending on such a party to serve binaries didn't feel great to begin with.
after clarifying online discussions of docker's vague announcement of removing
free team organizations it was clearly time to move off hub.docker.com.  best to
self-host.

r.xmox.nl is hosted with the new github.com/mjl-/vex.

pinging issue #3
This commit is contained in:
Mechiel Lukkien 2023-03-20 09:28:17 +01:00
parent a6e603e1df
commit a9b2bc8cec
No known key found for this signature in database
3 changed files with 14 additions and 13 deletions

View file

@ -60,12 +60,11 @@ Verify you have a working mox binary:
Note: Mox only compiles for/works on unix systems, not on Plan 9 or Windows. Note: Mox only compiles for/works on unix systems, not on Plan 9 or Windows.
You can also run mox with docker image "docker.io/moxmail/mox", with tags like You can also run mox with docker image `r.xmox.nl/mox`, with tags like `v0.0.1`
"latest", "0.0.1" and "0.0.1-go1.20.1-alpine3.17.2", see and `v0.0.1-go1.20.1-alpine3.17.2`, see https://r.xmox.nl/repo/mox/. See
https://hub.docker.com/r/moxmail/mox. See docker-compose.yml in this docker-compose.yml in this repository for instructions on starting. You must run
repository for instructions on starting. You must run docker with host docker with host networking, because mox needs to find your actual public IP's
networking, because mox needs to find your actual public IP's and get the and get the remote IPs for incoming connections, not a local/internal NAT IP.
remote IPs for incoming connections, not a local/internal NAT IP.
# Quickstart # Quickstart

View file

@ -14,8 +14,9 @@
version: '3.7' version: '3.7'
services: services:
mox: mox:
# Replace latest with the version you want to run. # Replace "latest" with the version you want to run, see https://r.xmox.nl/repo/mox/.
image: docker.io/moxmail/mox:latest # Include the @sha256:... digest to ensure you get the listed image.
image: r.xmox.nl/mox:latest
environment: environment:
- MOX_DOCKER=yes # Quickstart won't try to write systemd service file. - MOX_DOCKER=yes # Quickstart won't try to write systemd service file.
# Mox needs host networking because it needs access to the IPs of the # Mox needs host networking because it needs access to the IPs of the

View file

@ -36,19 +36,20 @@ echo Building with $goversion and $alpineversion
# needed because the platform in "FROM --platform <image>" in the first stage # needed because the platform in "FROM --platform <image>" in the first stage
# seems to override the TARGET* variables. # seems to override the TARGET* variables.
test -d empty || mkdir empty test -d empty || mkdir empty
(podman manifest rm moxmail/mox:$moxversion-$goversion-$alpineversion || exit 0) ((rm -r tmp/gomod || exit 0); mkdir -p tmp/gomod) # fetch modules through goproxy just once
(podman manifest rm mox:$moxversion-$goversion-$alpineversion || exit 0)
for platform in $(echo $platforms | sed 's/,/ /g'); do for platform in $(echo $platforms | sed 's/,/ /g'); do
goos=$(echo $platform | sed 's,/.*$,,') goos=$(echo $platform | sed 's,/.*$,,')
goarch=$(echo $platform | sed 's,^.*/,,') goarch=$(echo $platform | sed 's,^.*/,,')
podman build --platform $platform -f Dockerfile.release -v $HOME/go/pkg/sumdb:/go/pkg/sumbd:ro --build-arg goos=$goos --build-arg goarch=$goarch --build-arg moxversion=$moxversion --manifest moxmail/mox:$moxversion-$goversion-$alpineversion empty podman build --platform $platform -f Dockerfile.release -v $HOME/go/pkg/sumdb:/go/pkg/sumbd:ro -v $PWD/tmp/gomod:/go/pkg/mod --build-arg goos=$goos --build-arg goarch=$goarch --build-arg moxversion=$moxversion --manifest mox:$moxversion-$goversion-$alpineversion empty
done done
cat <<EOF cat <<EOF
# Suggested commands to push images: # Suggested commands to push images:
podman manifest push --all moxmail/mox:$moxversion-$goversion-$alpineversion docker.io/moxmail/mox:$moxversion-$goversion-$alpineversion podman manifest push --all mox:$moxversion-$goversion-$alpineversion \$host/mox:$moxversion-$goversion-$alpineversion
podman manifest push --all moxmail/mox:$moxversion-$goversion-$alpineversion docker.io/moxmail/mox:$moxversion podman manifest push --all mox:$moxversion-$goversion-$alpineversion \$host/mox:$moxversion
podman manifest push --all moxmail/mox:$moxversion-$goversion-$alpineversion docker.io/moxmail/mox:latest podman manifest push --all mox:$moxversion-$goversion-$alpineversion \$host/mox:latest
EOF EOF