Skip to main content
Log in

A study of how Docker Compose is used to compose multi-component systems

  • Published:
Empirical Software Engineering Aims and scope Submit manuscript

Abstract

Many modern software applications are composed of several components (e.g., a web application is composed of a web server component and a database component). Each of these components can be instantiated as a container from a Docker image. Each Docker image corresponds to a software package (e.g, Apache or MySQL) along with various configuration details. Such containerization simplifies, speeds up, and enables the systematic deployment and maintenance of components at scale. As a natural progression of Docker, applications are now using “Docker Compose” to compose multi-component (aka. multi-container) applications by specifying the various components and their relations – in turn simplifying the deployment and maintenance of complex multi-component applications. This paper reports on a study of 4,103 open-source Github projects that use Docker Compose. Our primary goal is to better understand how it is used in the wild. We observe that over a quarter (26.8%) of the studied projects use Docker Compose for single-component applications. The Docker Compose file for an application is infrequently updated with 30% of such files never changed. We also observe that most of the composed applications leverage basic Docker Compose options instead of using advanced options (e.g., just 4.3% of the multi-component applications use a security related option). While Docker Compose has evolved over the years (it is currently at version 3), applications rarely adopt the new versions and 2.4% of the studied projects downgraded to an earlier version due to platform and option compatibility issues. Our study highlights that while applications are using Docker Compose, they appear to be content with its basic options and earlier versions in many instances. Future studies are needed to better understand how to improve the uptake of the more advanced aspects of Docker Compose, if they are needed at all.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19

Similar content being viewed by others

Notes

  1. https://github.com/SAILResearch/replication-21-ibrahim-dockercompose

  2. https://github.com/startnayit/warehouse/commit/116962abc6437c35056f3fb4c9c0a66fca6c2790

References

  • 451research (2019) 451 research. https://451research.com, 5. [Online; last accessed: 23 May, 2019]

  • Agrawal R, Imieliński T, Swami A (1993) Mining association rules between sets of items in large databases. In: Sigmod Record, pp 207–216

  • Brown (2015) Referencing docker images. https://windsock.io/referencing-docker-images, 4. [Online; last accessed: 26 August 2019]

  • Cito J, Schermann G, Wittern JE, Leitner P, Zumberi S, Gall HC (2017) An empirical analysis of the docker container ecosystem on github. In: 14th International conference on mining software repositories, pp 323–333

  • Datadog (2019) Datadog. https://www.datadoghq.com, 5. [Online; last accessed: 23 May 2019]

  • Datadog (2019) Docker adoption. https://www.datadoghq.com/docker-adoption, 5 [Online; last accessed: 23 May 2019]

  • Docker (2017) Best practices for writing dockerfiles. https://docs.docker.com/develop/develop-images/dockerfile_best-practices, 2. [Online; last accessed: 22 August, 2019

  • Docker (2019) Docker. https://www.docker.com, 5. [Online; last accessed: 23 May 2019

  • DockerCompose (2017) Environment variables in compose. https://docs.docker.com/compose/environment-variables, 2 [Online; last accessed: 27 August 2019]

  • DockerCompose (2017) Overview of docker compose. https://docs.docker.com/compose, 2. [Online; last accessed: 23 August 2019]

  • DockerCompose (2018) Compose file versions and upgrading. https://docs.docker.com/compose/compose-file/compose-versioning, 10. [Online; last accessed: 23 August 2019]

  • DockerCompose (2019) Docker compose version 1. https://docs.docker.com/v17.09/compose/compose-file/compose-file-v1, 6. [Online; last accessed: 16 July 2019]

  • DockerCompose (2019) Docker compose version 1. https://docs.docker.com/v17.09/compose/compose-file/compose-versioning/#version-1, 6. [Online; last accessed: 16 July 2019]

  • DockerCompose (2019) Docker compose version 2. https://docs.docker.com/compose/compose-file/compose-file-v2, 6. [Online; last accessed: 16 July 2019]

  • DockerCompose (2019) Docker compose version 3. https://docs.docker.com/v17.09/compose/compose-file/compose-versioning, 6. [Online; last accessed: 16 July 2019]

  • DockerHub (2019) Build and ship any application anywhere. https://hub.docker.com, 5. [Online; last accessed: 23 May 2019]

  • Gallaba K, McIntosh S (2018) Use and misuse of continuous integration features: An empirical study of projects that (mis)use travis ci. In: IEEE transactions on software engineering, pp 1–1

  • Google (2019) Google big query. https://console.cloud.google.com/bigquery?p=bigquery-public-data, 8. [Online; last accessed: 23 August 2019]

  • Gousios G (2013) The ghtorrent dataset and tool suite. In: 10th Working conference on mining software repositories, pp 233–236

  • Henkel J, Bird C, Lahiri SK, Reps T (2020) Learning from, understanding, and supporting devops artifacts for docker. In: 2020 IEEE/ACM 42nd international conference on software engineering (ICSE), pp 38–49. IEEE

  • Horton E, Parnin C (2019) Dockerizeme: Automatic inference of environment dependencies for python code snippets. In: 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE), pp 328–338

  • Humble J, Farley D (2010) Continuous delivery: reliable software releases through build. In: Test, and Deployment Automation, pp. 2013–01

  • Muhtaroglu N, Kolcu B, Arı İ (2017) Testing performance of application containers in the cloud with hpc loads. In: 5th International conference on parallel, distributed, grid and cloud computing for engineering. Civil-Comp

  • Serverwatch (2019) Container revenue growing to 2.7b by 2020. https://www.serverwatch.com/server-news/container-revenue-growing-to-2.7b-by-2020.html, 5. [Online; last accessed: 23 May 2019

  • Shu R, Gu X, Enck W (2017) A study of security vulnerabilities on dockerhub. In: 7th ACM on conference on data and application security and privacy, pp 269–280

  • Tak B, Kim H, Suneja S, Isci C, Kudva P (2018) Security analysis of container images using cloud analytics framework. In: Web Services, pp 116–133

  • Zerouali A, Mens T, Robles G, Gonzalez-Barahona J M (2019) On the relation between outdated docker containers, severity vulnerabilities, and bugs. In: 26th International conference on software analysis, evolution and reengineering, pp 491–501

  • Zhang Y, Wang H, Filkov V (2019) A clustering-based approach for mining dockerfile evolutionary trajectories. Sci China Inf Sci 62:19101:1–19101:3

    Google Scholar 

  • Zhang Y, Yin G, Wang T, Yu Y, Wang H (2018) An insight into the impact of dockerfile evolutionary trajectories on quality and latency. In: 42nd Annual computer software and applications conference, vol 01, pp 138–143

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Md Hasan Ibrahim.

Additional information

Communicated by: Robert Feldt and Thomas Zimmermann

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ibrahim, M.H., Sayagh, M. & Hassan, A.E. A study of how Docker Compose is used to compose multi-component systems. Empir Software Eng 26, 128 (2021). https://doi.org/10.1007/s10664-021-10025-1

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10664-021-10025-1

Keywords

Navigation