Docker build environment

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:
    $ sudo apt-get remove docker docker-engine containerd runc
    $ sudo apt-get update
    $ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
    $ curl -fsSL | sudo apt-key add -
    $ sudo add-apt-repository \
       "deb [arch=amd64] \
       $(lsb_release -cs) \
    $ sudo apt-get update
    $ sudo apt-get install docker-ce docker-ce-cli
    $ 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 for more information.
  • Allow your user to run docker commands
    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 '': 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.

The updated docker command example:

docker run --rm -it -v $PWD:/work --workdir=/work /work/

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