From 02e53b972750e0a5d8200b910579784c06840e09 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 4 Jan 2021 02:58:05 +0000 Subject: README.md: summary Dockerfile with all necessary lines in one step Until now, the description in 'README.md' to build the Dockerfile in 'README.md' had one item per line, thoroughly describing the reason behind that line. But in many cases, the user is already familiar with Docker (or has already read through the items) and just wants to have the Dockerfile ready fast. In these cases, all those extra explanations are annoying. With this commit, an item '0' has been added at the start of the item list for summary. It only contains the necessary Dockerfile contents with no extra explanation. --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 0e26ddb..98ba390 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,32 @@ build the final PDF, please disable internet after the configuration phase. Note that only the necessary TeXLive packages are installed (~350 MB), not the full TeXLive collection! + 0. **Summary:** If you are already familiar with Docker, then the full + Dockerfile to get the project environment setup is shown here (without + any comments or explanations, because explanations are done in the next + items). Note that the last two `COPY` lines (to copy the directory + containing software tarballs used by the project and the possible input + databases) are optional because they will be downloaded if not + available. Once you build the Docker image, your project's environment + is setup and you can go into it to run `./project make` manually. + + ```shell + FROM debian:stable-slim + RUN apt-get update && apt-get install -y gcc g++ wget + RUN useradd -ms /bin/sh maneager + USER maneager + WORKDIR /home/maneager + RUN mkdir build + RUN mkdir software + COPY --chown=maneager:maneager ./project-source /home/maneager/source + COPY --chown=maneager:maneager ./software-dir /home/maneager/software + COPY --chown=maneager:maneager ./data-dir /home/maneager/data + RUN cd /home/maneager/source \ + && ./project configure --build-dir=/home/maneager/build \ + --software-dir=/home/maneager/software \ + --input-dir=/home/maneager/data + ``` + 1. **Choose the base operating system:** The first step is to select the operating system that will be used in the docker image. Note that your choice of operating system also determines the commands of the next -- cgit v1.2.1