News for hackers. Stuff that matters.
Re:GitLab Container Registry by diggan on Monday May 23, 2016 @03:00PM (#11755998)
I'm excited for this, seems like GitLab is moving more into a all-in-one solution, compared to Github that focuses on "social coding", whatever that now means.

So to try out this new feature (together with the pipelines), I tried setting up a simple project that uses a docker image to serve a simple html page.

However, it seems like it's not possible to build/push from the CI system (unless you setup a self-hosted runner) which kind of leaves this "Container Registry" without value, because I still need to manually build/push my images from one machine...

Re:GitLab Container Registry by sytse on Monday May 23, 2016 @03:08PM (#11756057)
Thanks, our idea is indeed to build an all-in-one solution. For more information see https://about.gitlab.com/direction/#scope

You should be able to build/push from the CI system, see the example GitLab CI configuration file in the blog post.

EDIT: For GitLab.com users using shared runners this is waiting on the Runner upgrade that we'll do in the coming days. If you use your own runner that runs 1.2 it should be fine.

Re:GitLab Container Registry by drewcrawford on Monday May 23, 2016 @06:28PM (#11757541)
Does this work for autoscale runners? Are those privileged by default?
Re:GitLab Container Registry by sytse on Monday May 23, 2016 @07:18PM (#11757771)
It is about the Runners needing to be on version 1.2. We'll upgrade the .com autoscaling ones in the coming days. If you run your own autoscaling runners you can upgrade yourself.
Re:GitLab Container Registry by diggan on Monday May 23, 2016 @04:06PM (#11756500)
Ah, thanks to sytse, Snappy and tmaczukin for the replis. I missed that.

My configuration looks like this currently (and I'm guessing I'll hold of for a few days for the shared workers to get updated):

  image: docker:latest
  services:
  - docker:dind
  stages:
    - build
    - deploy
  build:
    stage: build
    script:
      - docker build -t registry.gitlab.com/victorbjelkholm/deploy-html-test:latest .
    only:
      - master
  deploy:
    stage: deploy
    script:
      - docker push registry.gitlab.com/victorbjelkholm/deploy-html-test:latest
    only:
      - master
Re:GitLab Container Registry by Snappy on Monday May 23, 2016 @04:48PM (#11756842)
If you're going to use the shared runners, I don't think that configuration is going to work. The build step will build it locally, and even though you named it to use the registry, it won't actually push to the registry automatically. By breaking up the push to another step, you're actually going to run that deploy stage on a fresh Digital Ocean instance, so your previously-built image will be lost.

That's why the example pushed the image right after the build step.

Having said that, if you're literally using that script, you don't even have tests, so you may as well just put both steps into a single build stage like the simplified example. :)

For now, you'll need the explicit `docker login` as well. We'll work to remove that.

Re:GitLab Container Registry by sytse on Monday May 23, 2016 @04:35PM (#11756741)
Thanks, you didn't miss anything in the blog post, we updated the blog post. https://gitlab.com/gitlab-com/www-gitlab-com/commit/c758f6b2...
Re:GitLab Container Registry by tmaczukin on Monday May 23, 2016 @03:11PM (#11756089)
Our shared runners should be updated within a week. Then you will be able to use Container Registry on GitLab.com without self-hosted runner.
Re:GitLab Container Registry by Snappy on Monday May 23, 2016 @03:17PM (#11756126)
Yeah, sorry about that. We'll update the blog post to clarify. We're updating the CI runners this week to support this.
Re:GitLab Container Registry by sytse on Monday May 23, 2016 @04:36PM (#11756743)