Project

General

Profile

Docker build environment

https://docs.docker.com/get-started/overview/

Docker images are used to provide a consistent/known environment in which we can run our builds.

These instructions assume you are running Ubuntu Linux 18.04+ 64-bit
Note: Running these steps using a VM or Windows Subsystem for Linux may work but might result in some disk performance issues

Installing Docker

  • Install docker: https://docs.docker.com/engine/install/ubuntu/
    $ sudo apt-get remove docker docker-engine docker.io containerd runc
    $ sudo apt-get update
    $ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
    $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    $ sudo add-apt-repository \
       "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
       $(lsb_release -cs) \
       stable" 
    $ sudo apt-get update
    $ sudo apt-get install docker-ce docker-ce-cli containerd.io
    $ sudo docker run hello-world
    
    • Note: If you are running in a proxy environment, these commands will not work as-is. You will need to configure docker and possibly your OS to use your network proxy. Please confirm your version of Docker and then follow https://docs.docker.com/network/proxy/ for more information.
  • Allow your user to run docker commands https://docs.docker.com/engine/install/linux-postinstall/
    Warning: The docker group grants privileges equivalent to the root user
    $ sudo usermod -aG docker $USER
    $ sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
    $ sudo chmod g+rwx "$HOME/.docker" -R
    $ newgrp docker 
    $ docker run hello-world
    $ sudo systemctl enable docker
    

LetsEncrypt cert error (September 30 2021)

If you are getting the following error:

fatal: unable to access 'https://git.linaro.org/toolchain/gcc.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

On September 30 2021, the original root certificate for LetsEncrypt expired. A replacement cert has been implemented for a while but systems that haven't been updated in the past year may fail to validate the certificate. This has affected the crops/poky docker images. An issue has been raised with them to have them rebuild the images but in the meantime we've (hopefully temporarily) rebuilt their images and are hosting them on GitHub.

https://github.com/jcormier/crops_poky

The updated docker command example:

docker run --rm -it -v $PWD:/work ghcr.io/jcormier/crops_poky:ubuntu-18.04 --workdir=/work /work/build.sh

Go to top
Add picture from clipboard (Maximum size: 1 GB)