codefreshdemo / cf-example-build-arguments

Example of Codefresh pipeline that builds a docker image with arguments

Home Page:https://codefresh.io/docs/docs/yaml-examples/examples/build-an-image-with-build-arguments/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of building a docker image with arguments

This is a Git repository that holds a Node application and a Dockerfile. The dockerfile is expecting two build arguments.

Packaging the Node.js app

To compile and package using Docker

docker build . -t my-node-app --build-arg NODE_VERSION=8 --build-arg APP_DIR=/usr/src/app

Running the docker image

docker run -p 3000:3000 my-node-app

and then visit http://localhost:3000 in your browser

To use this project in Codefresh

There is also a codefresh.yml for easy usage with the Codefresh CI/CD platform.

More details can be found in Codefresh documentation.

About

Example of Codefresh pipeline that builds a docker image with arguments

https://codefresh.io/docs/docs/yaml-examples/examples/build-an-image-with-build-arguments/


Languages

Language:JavaScript 55.0%Language:Dockerfile 45.0%