Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Example Portfolio Application Example Portfolio Application
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • E-10
    • Teaching
  • Mathematical Image Processing
  • Example Portfolio ApplicationExample Portfolio Application
  • Issues
  • #18

Closed
Open
Created Oct 22, 2021 by Fabian Nuraddin Alexander Gabel@cfg0846Owner

job to update docker container

everytime that Dockerfile is updated, the container in the repo's registry should be updated as well.

See here for an example: https://collaborating.tuhh.de/cfg0846/research-topics-mat-tuhh/-/blob/dev/.gitlab-ci.yml

Basically one needs to setup the name of the Dockerfile and the changes directive accordingly

update-aplpine-ssh:
  stage: docker-update
  allow_failure: false
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  script:
    - mkdir -p /kaniko/.docker
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
    - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/docker/alpine-ssh.Dockerfile --destination $CI_REGISTRY_IMAGE/alpine-ssh:latest
  only:
    refs:
      - branches
      - merge_requests
    changes:
      - docker/alpine-ssh.Dockerfile
Edited Oct 22, 2021 by Fabian Nuraddin Alexander Gabel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking