Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Dockerfile
README
VERSION
docker-entrypoint.sh

README

Creating FROM image
===================

To have a single Dockerfile for both amd64 and arm containers we need to create a manifest - essentially a sort of container which links to other containers, depending on the architecture - as the FROM for that Dockerfile.

To do this, run the following commands - modifying:
- VERSION as applicable
- The Ubuntu version if desired

  docker manifest create piersfinlayson/esp8266-build-from:<VERSION> piersfinlayson/ubuntu:18.04 resin/rpi-raspbian:latest
  docker manifest annotate piersfinlayson/esp8266-build-from:<VERSION> resin/rpi-raspbian:latest --arch arm --os linux
  docker manifest inspect piersfinlayson/esp8266-build-from:<VERSION>

Should be something like:

{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1150,
         "digest": "sha256:6b9eb699512656fc6ef936ddeb45ab25edcd17ab94901790989f89dbf782344a",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2601,
         "digest": "sha256:7b190b0f9115b4a8d7980940e923c137a029aba386368202cc149c6346b84b1d",
         "platform": {
            "architecture": "arm",
            "os": "linux"
         }
      }
   ]
}

  docker manifest push piersfinlayson/esp8266-build-from:<VERSION>

You should then modify the Dockerfile to FROM the correct new image (manifest).

Creating individual build image
==============================

Edit the VERSION file to contain the SDK version.

On a machine with the required architecture run:

  docker build -t piersfinlayson/esp8266-build-<architecture>:VERSION .

<architecture> should be one of:
- amd64
- arm

Tag the image:

  docker tag piersfinlayson/esp8266-build-<architecture>:VERSION piersfinlayson/esp8266-build-<architecture>:latest

Once created push the image to dockerhub:

  docker push piersfinlayson/esp8266-build-<architecture>:latest
  docker push piersfinlayson/esp8266-build-<architecture>:<VERSION>

Creating architecture independent build image
=============================================

Once both architecture build images have been created, create an architecture independent manifest.  Make sure the push includes --purge otherwise the manifest stays on the machine, causing problems in future.

  docker manifest create piersfinlayson/esp8266-build:<VERSION piersfinlayson/esp8266-build-amd64:<VERSION> piersfinlayson/esp8266-build-arm:<VERSION>
  docker manifest annotate piersfinlayson/esp8266-build:latest piersfinlayson/esp8266-build-amd64:<VERSION> --arch amd64 --os linux
  docker manifest annotate piersfinlayson/esp8266-build:latest piersfinlayson/esp8266-build-arm:<VERSION> --arch arm --os linux
  docker manifest push --purge piersfinlayson/esp8266-build:<VERSION>
  docker tag piersfinlayson/esp8266-build:<VERSION> piersfinlayson/esp8266-build:latest
  docker manifest push --purge piersfinlayson/esp8266-build:latest