Build an Image with the Dockerfile in Root Directory

Using this repository we’ll help you get up to speed with basic functionality such as: building Docker images.

This project uses Node JS to build an application which will eventually become a distributable Docker image.

Looking around

In the root of this repository you’ll find a file named codefresh.yml, this is our build descriptor and it describes the different steps that comprise our process. Let’s quickly review the contents of this file:

codefresh.yml

version: '1.0'
steps:
  build_image:
    title: Building Image
    type: build
    #Important: rename this image to to a valid repository in your registry. For example: myUserName/vote
    image_name: codefresh/example
    #The directory should be relative to git repository that is used for cloning
    working_directory: ${{main_clone}}
    #Dockerfile location should be relative to the working directory
    dockerfile: Dockerfile

For more information about the steps and fields in the codefresh.yml file, see.

Example

Just head over to the example repository in Github and follow the instructions there.