diff --git a/README.adoc b/README.adoc index adc1a9af..ae802602 100644 --- a/README.adoc +++ b/README.adoc @@ -289,8 +289,11 @@ where all repositories are found. Dockerfiles are provided in the `docker/` directory. To build the image, run the following commands: - # git clone https://github.com/bootlin/elixir - # docker build -t elixir -f ./elixir/docker/Dockerfile ./elixir/ + # git clone https://github.com/bootlin/elixir.git ./elixir + # docker build -t elixir --build-arg ELIXIR_VERSION=`git rev-parse --short HEAD` ./elixir/Dockerfile ./elixir + +ELIXIR_VER build argument is optional. Since .git directory is not copied into Docker image by default, +the option is used to pass a version string to Elixir. You can then run the image using `docker run`. Here we mount a host directory as Elixir data: diff --git a/docker/Dockerfile b/docker/Dockerfile index 4ce44e5c..9288cd7e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -52,4 +52,7 @@ RUN a2enmod rewrite EXPOSE 80 +ARG ELIXIR_VERSION +ENV ELIXIR_VERSION=$ELIXIR_VERSION + ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]