Push an image
Using the Codefresh UI to push Docker images to a Registry
In Codefresh there are several ways that you can use to push Docker images to a registry
- Using the graphical pipeline steps as explained in this page
- Using the push step in a YAML pipeline
- By promoting an existing image to another registry.
Notice that all successful builds automatically push their image to built-in Codefresh registry. If you use only this internal registry all push steps are optional (they are needed only for external registries).
Using the graphical steps for image pushing
With Codefresh, you can automatically push your build images to your Docker registry. First follow the instructions for connecting your external registry.
Access Your Pipeline
- Navigate to the Repositories view and find your repository
- Click the Gear icon to navigate to the Pipelines view
You will see all pipelines connected to this repository. Select the pipeline that you want to edit.
Name your Docker image
- Scroll down and navigate to the Build and Unit Test section
- In the Image Name text box, type a name for your image.
The name you provide must be valid by your Docker registry. For example Dockerhub requires your image to be tagged with your Dockerhub username before it can be pushed.
Select Your Registry
- Scroll down to the Push to Docker registry section
- Select your configured registry
Make sure you already have a configured registry. If not refer to the Docker registry integration documentation to connect it to Codefresh first.
Trigger a New Build
To trigger a new build, click the BUILD button.
Once your image is built, it will automatically be pushed to your external registry.