From bfda0de3ff8c80ae7f4a40a778a7058b22a3ea5c Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Mon, 13 May 2019 15:33:09 +0200 Subject: [PATCH] Add draft of Docker instructions Changes from review Syntax fix Change path Add mention of JSON too Change path Restructure Update docs/installing-solidity.rst Co-Authored-By: chriseth Update docs/installing-solidity.rst Co-Authored-By: chriseth Fixes from review --- docs/installing-solidity.rst | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst index cea4cbc7b..120e542f0 100644 --- a/docs/installing-solidity.rst +++ b/docs/installing-solidity.rst @@ -60,17 +60,36 @@ Please refer to the solc-js repository for instructions. Docker ====== -We provide up to date docker builds for the compiler. The ``stable`` -repository contains released versions while the ``nightly`` -repository contains potentially unstable changes in the develop branch. +Docker images of Solidity builds are available using the ``solc`` image from the ``ethereum`` organisation. +Use the ``stable`` tag for the latest released version, and ``nightly`` for potentially unstable changes in the develop branch. + +The Docker image runs the compiler executable, so you can pass all compiler arguments to it. +For example, the command below pulls the stable version of the ``solc`` image (if you do not have it already), +and runs it in a new container, passing the ``--help`` argument. .. code-block:: bash - docker run ethereum/solc:stable --version + docker run ethereum/solc:stable --help -Currently, the docker image only contains the compiler executable, -so you have to do some additional work to link in the source and -output directories. +You can also specify release build versions in the tag, for example, for the 0.5.4 release. + +.. code-block:: bash + + docker run ethereum/solc:0.5.4 --help + +To use the Docker image to compile Solidity files on the host machine mount a +local folder for input and output, and specify the contract to compile. For example. + +.. code-block:: bash + + docker run -v /local/path:/sources ethereum/solc:stable -o /sources/output --abi --bin /sources/Contract.sol + +You can also use the standard JSON interface (which is recommended when using the compiler with tooling). +When using this interface it is not necessary to mount any directories. + +.. code-block:: bash + + docker run ethereum/solc:stable --standard-json < input.json > output.json Binary Packages ===============