Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.7 KB

README.md

File metadata and controls

52 lines (34 loc) · 1.7 KB

Yadoms build docker image

Image docker for building Yadoms for continuous integration

Build Yadoms for specific branch :

docker run -e MAKE_PACKAGE=true -e YADOMS_BUILD_BRANCH=${YADOMS_BRANCH} -e UPLOAD_FTP_CREDENTIALS=${FTP_USER}:${FTP_PASSWORD} yadoms/build_for_raspberrypi
  • MAKE_PACKAGE : define to true to build also install and update packages (default to false)
  • YADOMS_BUILD_BRANCH : specify a branch to build (default to develop)
  • UPLOAD_FTP_CREDENTIALS : if defined, upload build results to www.yadoms.com FTP site (default not defined)

Building image

Build from scratch

It will build the image from local cache (or from zero if no cache)

docker build --cache-from yadoms/build_for_ubuntu:latest -t build_for_ubuntu .
docker tag build_for_ubuntu yadoms/build_for_ubuntu
docker push yadoms/build_for_ubuntu

Build reusing previously built image (in case cache not on local machine)

Example : you want to update a Docker image (chaging the entrypoint.sh script) If building from a new environment all step will be computed. (changing entrypoint is the last step, and we could reuse an image from docker-hub to build faster)

docker pull yadoms/build_for_ubuntu:latest
docker build --cache-from yadoms/build_for_ubuntu:latest -t build_for_ubuntu .
docker tag build_for_ubuntu yadoms/build_for_ubuntu
docker push yadoms/build_for_ubuntu

Setup build options

Using proxy

Add the following args to the docker build command:

  • http_proxy
  • https_proxy
docker build --build-arg http_proxy=http://myproxyadress:8080 --build-arg https_proxy=http://myproxyadress:8080 -t build_for_ubuntu .