This document provides a description and usage instructions for the different use-cases of Holochain Docker images.
TODO: This file and the hc-dev-tool scripts are out of data, and need to be updated.
This is a list of use-cases for Docker in the context of Holochain. Once you have found the Docker image for your needs, scroll down to the relevant image section below.
Docker can also be used for doing development inside of containers. This can be helpful for developers who are unable to (or don't want to) run Holochain directly on their system.
For this use-case, one of the hc-dev-tools images should be built and run interactively.
Docker can also be used for distributing a Holochain application as an image.
For this use-case one of the Holochain/holochain-proto images should be used as the base of a custom image for your project.
This is a list of Docker images published by holochain as well as instructions on how to use them.
These images are based on the official golang with the addition of installing the hc command.
In order to use these images place their tag in the FROM statement of your Dockerfile.
Example of an image which distributes a holochain app:
FROM Holochain/holochain-proto
RUN hcadmin init address@example.org
ENV appdir="/home/holochain/app"
COPY . ${appdir}
# Files when first copied are owned by root.
RUN sudo chown -R holochain:holochain ${appdir}/.. \
\
&& hc clone ${appdir} MYAPPNAMEHERE \
&& rm -rf ${appdir} \
&& hc gen chain MYAPPNAMEHERE
CMD ["hc", "web", "MYAPPNAMEHERE"]These images are basically the official golang images except with the hc command and a few other tools installed.
In order to build the latest version of this image, run the following commands from the root of the Holochain repository:
- Build it using the
docker/build - Run it using the
docker/run