• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Build automated images on Docker Hub
Preconditions for an automated build are:
[li]You need a Docker Hub account[/li]
[li]You need a Github account[/li]
[li]You need to create a repository on Docker Hub in automated mode[/li]

How to setup a Docker image repository to be built automated on Docker Hub servers can be read here.

Next to a Docker Hub account a Github account is needed to allow Docker Hub accessing your sources during the web build process.

A file named Dockerfile is basis for any built process whether it is built remotely on the web or locally using the Docker (CLI) Command Line Interface (if you have access to it).

This file contains the command instructions in adjacent order executed during the build process. There is just a set of maybe 10 commands the Dockerfile interpreter understands.

When creating a new repository on your Docker Hub registry you can specify whether or not it is of type automated under the tab create.

If you chose Create Automated Build you have to link your repo to the Github sources. After that you can immediately start the build process if the Github account contains the Dockerfile at least. When finished the built image will be placed on your repository ready for download.

As you can imagine Docker Hub servers are all x86 based platforms. Actually they can't generate ARM processor based code needed for a Raspberry compatible output. With the following trick described here you can extend your Dockerfile by a set of files moving Docker Hub to emulate an ARM CPU during build process. Precondition is that your automated build rely on base images provided by group resin.io containing the ARM software emulator QEMU.

Here is a code extract of how to prepare your Dockerfile for an automated web build:

FROM resin/... (can be any resin.io ARM base image)

COPY armv7hf-debian-qemu /usr/bin
RUN [ "cross-build-start" ]

... all your other commands

RUN [ "cross-build-end" ]

The script cross-build-start brings the build server into a state to use the QEMU ARM software emulator that is part of any resin.io base image on all next commands. The script cross-build-end at the end exits the emulation mode.

The script files you need can be obtained from here to copy them over to your github repository into the folder armv7hf-debian-qemu in the example above.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)


Possibly Related Threads...
Thread Author Replies Views Last Post
  docker.service start failed EUROKEY 6 26 February-6th-2020, 09:49 AM
Last Post: EUROKEY
  After „Rebuild“ of Docker neither the node-RED nor the dashboard can be accessed MAK 4 20 January-31st-2020, 02:14 PM
Last Post: MAK
  [SOLVED] Docker GUI login issue MGharat 1 26 September-19th-2019, 11:50 AM
Last Post: Armin@netPI
  Exporting and importing container images Armin@netPI 0 29 August-23rd-2019, 10:39 AM
Last Post: Armin@netPI
Information netPI Docker REST API for versions >= V1.1.4.0 patrick 1 85 July-16th-2019, 02:45 PM
Last Post: patrick
  [SOLVED] Pull Docker Image a.w.d.m. 8 45 July-8th-2019, 11:17 AM
Last Post: Armin@netPI
  [SOLVED] Docker issues AlexRegev 7 195 June-26th-2019, 02:14 PM
Last Post: AlexRegev
  docker timing MGharat 2 36 June-13th-2019, 08:57 AM
Last Post: patrick
  Launching multi-containers at a time - Docker stacks Armin@netPI 0 44 June-4th-2019, 04:11 PM
Last Post: Armin@netPI
  [INFO]Docker DNS server Armin@netPI 0 22 March-7th-2019, 09:02 AM
Last Post: Armin@netPI

Forum Jump:

Users browsing this thread: 1 Guest(s)