Skip to content

Commit

Permalink
docker: Fix debian/Dockerfile filepath and README doc
Browse files Browse the repository at this point in the history
Two things get fixed here:

 - README says downloading Dockerfile is enough. It is not; Debian
   Dockerfile requires docker/debian/000-default.conf file.

 - docker/debian/Dockerfile links to 000-default.conf file using:

      COPY ./docker/debian/000-default.conf /etc/apache2/sites-available/000-default.conf

   This means following command in README cannot work:

      docker build [...] .

   Either you set cwd to root Git repo and Dockerfile is not found, or
   you set cwd to docker/debian/ and 000-default.conf is not found.
   Correct command would be:

      docker build -f docker/debian/Dockerfile [...] .

We fix Dockerfile by expecting 000-default.conf to be in cwd. We fix
README by rewording the paragraph and updating commands to work based
on Git repo root directory.

Signed-off-by: Théo Lebrun <[email protected]>
  • Loading branch information
tleb authored and Michael Opdenacker committed Apr 29, 2024
1 parent 834806e commit c8bcfc8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,14 @@ where all repositories are found.

= Building Docker images

Docker files are provided in the `docker/` directory. To generate your own
Docker image for indexing the sources of a project (for example for the Musl
project which is much faster to index than Linux), download the `Dockerfile`
file for your target distribution and run:

$ docker build -t elixir --build-arg GIT_REPO_URL=git://git.musl-libc.org/musl --build-arg PROJECT=musl .
Docker files are provided in the `docker/` directory. To generate a Docker image
for indexing the sources of a project, first fetch the Elixir repository. Then
pick the project you want to index (Musl is nice test data being not too slow
to index) and your target distribution (`debian` and `centos` available), and
run:

$ docker build -t elixir-debian --build-arg GIT_REPO_URL=git://git.musl-libc.org/musl --build-arg PROJECT=musl ./docker/debian/
$ docker build -t elixir-centos --build-arg GIT_REPO_URL=git://git.musl-libc.org/musl --build-arg PROJECT=musl ./docker/centos/

Then you can use your new container as follows (you get the container id from the output of `docker build`):

Expand Down
2 changes: 1 addition & 1 deletion docker/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN \

# apache elixir config, see elixir README
# make apache less stricter about cgitb spam headers
COPY ./docker/debian/000-default.conf /etc/apache2/sites-available/000-default.conf
COPY ./000-default.conf /etc/apache2/sites-available/000-default.conf

RUN \
echo -e "\nHttpProtocolOptions Unsafe" >> /etc/apache2/apache.conf && \
Expand Down

0 comments on commit c8bcfc8

Please sign in to comment.