# Can Discourse ship frequent Docker images that do not need to be bootstrapped?

**URL:** https://meta.discourse.org/t/can-discourse-ship-frequent-docker-images-that-do-not-need-to-be-bootstrapped/33205
**Category:** Development
**Created:** [14 september 2015 om 07:01 UTC](https://meta.discourse.org/t/can-discourse-ship-frequent-docker-images-that-do-not-need-to-be-bootstrapped/33205 "2015-09-14T07:01:52Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![fbender](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fbender/32/116736_2.png) [@fbender](https://meta.discourse.org/u/fbender)
#### Post date: [21 september 2015 om 18:49 UTC](https://meta.discourse.org/t/can-discourse-ship-frequent-docker-images-that-do-not-need-to-be-bootstrapped/33205/6 "2015-09-21T18:49:25Z")

</div>

FYI: Some of the stuff you described above is done in [phusion/baseimage](https://github.com/phusion/baseimage-docker "phusion/baseimage Docker image") (based on the official Ubuntu image), e.g. providing a proper init(-like) system incl. cron etc. You might want to check this out.

Without having analyzed the Docker file in detail, I suppose many of the “powerful” features you need can be done by copying a script into the image and executing it on every `docker run`, doing some checks if bootstrapping is needed and just going ahead and run the app if everything is set up. This will incure a cost on every launch of the container but that should not happen too often.

The bootstrap process would detect if the container has not been set up yet (i.e. default / missing config files) and immediately shutdown the container in that case. The “proper” config can then be loaded into the container via volumes or a custom, user-generated Dockerfile (based on the discourse image) so deployments are easier and do not require packaging and shipping a full image.

Some of the preliminary checks (like for system ressources) can still be performed within the `launcher` script (or moved to the bootstrap process within the container, I don’t see a problem with that) – disk size checks are IMHO unnecessary (at least before launching the container) since docker would complain if there is not enough disk space to download the image itself. But I would move most of the other checks into the container and have the `launcher` script be a simple entry point for beginners or lazies (like myself).

---

_[View the full topic](https://meta.discourse.org/t/can-discourse-ship-frequent-docker-images-that-do-not-need-to-be-bootstrapped/33205)._
