Can I build Docker contains for a Raspberry Pi on a AMD64 machine?

I am exploring using Docker containers on a Raspberry PI to help with managing upgrades to my application and the versions of NodeJS that it runs with.

I am wondering how the best way to build the containers would be. I could build the containers in the production machine, but it would be much more convenient if I could start with (say) the latest armvf nodejs image and build a new image with the application sources added (along with npm modules and bower components) that the application needs on my Home Desktop (Debian AMD64) or Laptop (OSX) or the Windows 7 machine I have available at work. I don’t need to run the containers, just build them.

  • Issues in using git forked package in Docker-compose
  • What is exactly happening when you're Docker Commiting a container?
  • Accessing system variables through HHVM
  • Docker ERROR: Volume specifies nonexistent driver inmemory
  • Why the image that built by myself dont run on the kubernetes,and the pod always restart?
  • Can I use Docker simply to set up the general environment of an EC2 instance?
  • One slight niggle is that the code needs to be kept confidential, so I can’t put the resultant containers in any public repository. Can I ensure the containers have managable names and can I just copy them around between machines?

  • Docker : Start mysql and apache from entrypoint or CMD
  • Upgrade docker container as part of docker-compose
  • Access denied when running phinx command on Docker container
  • OS name for docker images
  • Docker complains that bind source path doesn't exist, but it DOES
  • Docker permissions host user volume in the container
  • One Solution collect form web for “Can I build Docker contains for a Raspberry Pi on a AMD64 machine?”

    AFAIK containers are architecture agnostic. You should be able to modify them one a host with a different architecture, but will be unable to enter it. Entering basically means executing a program (e.g. a shell) in the container’s context. Since the container’s shell is not executable on your host this won’t work. Consequently cross-compiling within the container is also no option.

    However, if you cross-compile on the outside, you should be able to add your executables to the image, move it over to your pi and run it.

    You can move docker images without any public repository either with a private repository or you use docker save IMAGE > image.tar to store an image in a tarball, move it to the pi, and use docker load -i image.tar to restore it.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.