pages /
22 lines | ISO-8859-1 | 1 KB

Usage Scenario

Build a docker image and push to Docker hub

How to Set Up

We demonstrate the setup with a tutorial project. It is a react project created with npx create-react-app. In this project:

  1. A simple dockerfile is added to serve build result with Nginx
  2. A CI job is added in the build spec to build and publish the docker image. In this job:

    • the checkout step clones he repository into job workspace
    • the build step tests and creates production build
    • the publish docker image step builds and publishes the docker image
  3. This job should be executed by a docker aware executor (server docker executor, remote docker executor, or kubernetes executor), with the mount docker sock option enabled like below:



  4. You may also use the built-in build docker image step to do the job. In that case, you will need to specify docker registry login in job executor setting

Please wait...
Page is in error, reload to recover