• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Build automated images on Docker Hub
#1
Preconditions for an automated build are:
[ul]
[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]
[/ul]

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)

ENV QEMU_EXECVE 1
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)

  Reply


Messages In This Thread
Answer - by Armin@netPI - November-23rd-2017, 07:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  https certificate issues in new nodered docker image Dipro 1 1,661 May-4th-2022, 05:46 AM
Last Post: Armin@netPI
  Docker exposed port don't send data on eth0 COswald 3 3,106 July-15th-2021, 02:10 PM
Last Post: Armin@netPI
  Docker not enabled tad 10 4,821 July-14th-2021, 08:54 AM
Last Post: Armin@netPI
  Docker amd64 instead of arm biancode 3 3,004 January-17th-2021, 09:40 PM
Last Post: Armin@netPI
  docker.service start failed EUROKEY 13 9,163 January-17th-2021, 07:52 PM
Last Post: Armin@netPI
  Exporting and importing container images Armin@netPI 3 3,063 May-20th-2020, 11:24 AM
Last Post: COswald
  Docker cannot find image COswald 16 8,891 May-18th-2020, 07:15 AM
Last Post: COswald
  After „Rebuild“ of Docker neither the node-RED nor the dashboard can be accessed MAK 4 4,228 January-31st-2020, 02:14 PM
Last Post: MAK
  [SOLVED] Docker GUI login issue MGharat 1 2,726 September-19th-2019, 11:50 AM
Last Post: Armin@netPI
Information netPI Docker REST API patrick 1 3,354 July-16th-2019, 02:45 PM
Last Post: patrick

Forum Jump:


Users browsing this thread: 1 Guest(s)