Install Discourse with dockerfile

Is possible to install Discourse on a docker container with Jenkins configuring a Dockerfile?

Like that:

RUN mkdir -p /mnt/discourse
RUN git clone https://github.com/discourse/discourse_docker.git /mnt/discourse
RUN cd /mnt/discourse
COPY app.yml /mnt/discourse/containers/
CMD ["./launcher", "bootstrap", "app"]
CMD ["./launcher", "start", "app"]

Possible, probably. Easy? No.

I believe that you would need to build a custom image for that to work. See Can Discourse ship frequent Docker images that do not need to be bootstrapped?.

You could conceivably run the bootstrap command, which creates the docker image you need, and then start it up with the appropriate ENV settings.

But if you want support here, you’ll need to build and run the image with ./launcher.

2 Likes