https://cloud.google.com/container-registry/docs/quickstart
Make sure you have the gcloud tools setup, and then run:
gcloud auth configure-docker
17:25:35 eos:~/src/fastly/kryten-api$ git checkout jemershaw/docker
...
17:27:14 eos:~/src/fastly/kryten-api$ docker build --tag fastly/kryten-api:first .
...
17:29:05 eos:~/src/fastly/kryten-api$ docker tag fastly/kryten-api:first gcr.io/hardware-eng/kryten-api:first
17:29:12 eos:~/src/fastly/kryten-api$ docker push gcr.io/hardware-eng/kryten-api:first
The push refers to repository [gcr.io/hardware-eng/kryten-api]
75a36141a1ad: Pushed
7972c70a56dd: Pushed
9f7e620b6292: Pushed
45a046c531a4: Pushed
7f2ca18163c5: Pushed
64e2edb867c5: Pushed
d63c88281d4e: Pushed
a4507fabd147: Pushed
first: digest: sha256:820d935bf154c427a39e46f8e9fa44c8e5c48e88a85f9a65300b7543815dbfa1 size: 1995
17:32:50 eos:~/src/fastly/kryten-api$
17:32:50 eos:~/src/fastly/kryten-api$ docker images | grep kryten
fastly/kryten-api first a05ce6f2662a 8 minutes ago 978MB
gcr.io/hardware-eng/kryten-api first a05ce6f2662a 8 minutes ago 978MB
fastly/kryten-dummyplug latest 39f4c22ed37c 12 days ago 398MB
17:33:59 eos:~/src/fastly/kryten-api$ docker rmi fastly/kryten-api:first
Untagged: fastly/kryten-api:first
17:34:42 eos:~/src/fastly/kryten-api$ docker run gcr.io/hardware-eng/kryten-api:first
Server available at http://127.0.0.1:3000
XS.c: loadable library and perl binaries are mismatched (got handshake key 0xcd00080, needed 0xce00080)
That error probably means the carton
cache was built locally instead of inside the container, and they aren't
running the same distro version.
The dummyplug
Dockerfile
does this:
RUN rm -r /app/dummyplug/local
RUN carton && rm -r local/cache && rm -r ~/.cpanm
Fixed dockerfile: https://github.com/fastly/kryten-api/pull/135/commits/1ff852c71ea8d74de4063eb2cf579fba3794eb53