I want to incorporate Stellar-core and horizon into my private infrastructure using Docker. Can Stellar-core be packaged in a container system such as Docker?
Yes, Docker provides a simple way to incorporate stellar-core and horizon into your infrastructure so long as
TMP_DIR_PATH, and the database are stored on persistent volumes.
First, decide whether you want your container to be part of the public, production Stellar network (referred to as the pubnet) or the test network (called testnet) that is recommended while developing software because you need not worry about losing money on the testnet. You'll provide either
--testnet as a command line flag when starting the container to determine which network (and base configuration file) to use.
Next, you must decide whether you will use a docker volume or not. When not using a volume, the container is in ephemeral mode, that is, nothing will be persisted between runs of the container. Persistent mode is the alternative, which should be used in the case that you need to either customize your configuration (such as to add a validation seed) or would like to avoid a slow catch-up to the Stellar network in the case of a crash or server restart. Persistent mode is recommended for anything besides a development or test environment.
Finally, you must decide what ports to expose. A container that exposes no ports isn't very useful, so it's recommended at a minimum you expose the horizon http port.
I created a few docker images for stellar including one with core and horizon.
For a single node / testing and development context there is also this image: https://github.com/zulucrypto/docker-stellar-integration-test-network