update references to GCR
This commit is contained in:
8
build.sh
8
build.sh
@ -8,8 +8,8 @@ YOU_ARE_HERE="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
|||||||
# container will be useless unless we bundle the actual OS
|
# container will be useless unless we bundle the actual OS
|
||||||
test -f "$YOU_ARE_HERE"/container/hdd/hdd.img
|
test -f "$YOU_ARE_HERE"/container/hdd/hdd.img
|
||||||
|
|
||||||
# this image is private on Google Cloud Registry, make sure we're logged in
|
# this image is private on DigitalOcean, make sure we're logged in
|
||||||
gcloud auth configure-docker
|
doctl registry login
|
||||||
|
|
||||||
docker build -t gcr.io/jakejarvis/y2k:latest --no-cache "$YOU_ARE_HERE"
|
docker build -t registry.digitalocean.com/jakejarvis/y2k:latest --no-cache "$YOU_ARE_HERE"
|
||||||
docker push gcr.io/jakejarvis/y2k:latest
|
docker push registry.digitalocean.com/jakejarvis/y2k:latest
|
||||||
|
@ -64,20 +64,14 @@ cloudflared service install
|
|||||||
cp ~/.cloudflared/cert.pem /etc/cloudflared/
|
cp ~/.cloudflared/cert.pem /etc/cloudflared/
|
||||||
rm ~/.cloudflared/cert.pem
|
rm ~/.cloudflared/cert.pem
|
||||||
|
|
||||||
#### install Google Cloud Registry credential helper ####
|
#### login to DO registry ####
|
||||||
## https://cloud.google.com/container-registry/docs/advanced-authentication#standalone-helper
|
snap install doctl
|
||||||
## https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases
|
snap connect doctl:dot-docker
|
||||||
GCR_HELPER_VERSION=2.0.2
|
doctl auth init
|
||||||
curl -fsSL https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v${GCR_HELPER_VERSION}/docker-credential-gcr_linux_amd64-${GCR_HELPER_VERSION}.tar.gz | tar xz --to-stdout ./docker-credential-gcr > /usr/local/bin/docker-credential-gcr
|
doctl registry login
|
||||||
chmod +x /usr/local/bin/docker-credential-gcr
|
|
||||||
docker-credential-gcr version
|
|
||||||
|
|
||||||
#### login to GCR ####
|
|
||||||
docker-credential-gcr gcr-login
|
|
||||||
docker-credential-gcr configure-docker
|
|
||||||
|
|
||||||
#### pull OS container ####
|
#### pull OS container ####
|
||||||
docker pull gcr.io/jakejarvis/y2k:latest
|
docker pull registry.digitalocean.com/jakejarvis/y2k:latest
|
||||||
|
|
||||||
#### enable services ####
|
#### enable services ####
|
||||||
cp $REPO_DIR/host/example.service /lib/systemd/system/y2k.service
|
cp $REPO_DIR/host/example.service /lib/systemd/system/y2k.service
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
--network none \
|
--network none \
|
||||||
--log-driver none \
|
--log-driver none \
|
||||||
--rm -i \
|
--rm -i \
|
||||||
gcr.io/jakejarvis/y2k:latest
|
registry.digitalocean.com/jakejarvis/y2k:latest
|
||||||
|
|
||||||
# to spawn QEMU processes natively on the host machine instead of via
|
# to spawn QEMU processes natively on the host machine instead of via
|
||||||
# individual Docker containers:
|
# individual Docker containers:
|
||||||
|
Reference in New Issue
Block a user