Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose updates #9073

Merged
merged 9 commits into from
Nov 26, 2024
Merged

Conversation

rosieyohannan
Copy link
Contributor

@rosieyohannan rosieyohannan commented Nov 13, 2024

Description

  • Update instruction for installing Docker Compose in a non cimg image
  • Refer to the latest version of compose by using docker compose

Reasons

Customer confusion around docker-compose / docker compose

Content Checklist

Please follow our style when contributing to CircleCI docs. Our style guide is here: https://circleci.com/docs/style/style-guide-overview.

Please take a moment to check through the following items when submitting your PR (this is just a guide so will not be relevant for all PRs) 😸:

  • Break up walls of text by adding paragraph breaks.
  • Consider if the content could benefit from more structure, such as lists or tables, to make it easier to consume.
  • Keep the title between 20 and 70 characters.
  • Consider whether the content would benefit from more subsections (h2-h6 headings) to make it easier to consume.
  • Check all headings h1-h6 are in sentence case (only first letter is capitalized).
  • Is there a "Next steps" section at the end of the page giving the reader a clear path to what to read next?
  • Include relevant backlinks to other CircleCI docs/pages.

@rosieyohannan rosieyohannan marked this pull request as ready for review November 14, 2024 13:35
@rosieyohannan rosieyohannan requested review from a team as code owners November 14, 2024 13:35
@rosieyohannan rosieyohannan requested a review from a team November 18, 2024 22:32
@@ -281,7 +281,7 @@ jobs:
build2:
machine: # Specifies a machine image that uses
# an Ubuntu version 20.04 image with Docker 20.10.12
# and docker-compose 1.29.2, follow CircleCI Discuss Announcements
# and docker compose 1.29.2, follow CircleCI Discuss Announcements
# for new image releases.
image: ubuntu-2004:202201-02
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to your change, but whilst we are in the area:
We probably shouldn't recommend pinned version and instead should give examples with the current tag instead

## Using Docker Compose with docker executor
{: #using-docker-compose-with-docker-executor }

Using the `docker` execution environment combined with `setup_remote_docker` provides a remote engine similar to the one created with running Docker commands and the machine execution environment, but volume mounting and port forwarding do **not** work the same way in this setup. The remote docker daemon runs on a different system than the docker CLI and docker compose, so you must move data around to make this work. Mounting can usually be solved by making content available in a docker volume. It is possible to load data into a Docker volume by using `docker cp` to get the data from the CLI host into a container running on the docker remote host.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remote docker daemon runs on a different system than the docker CLI and docker compose
This isn't strictly true now. Remote docker jobs now run on a machine executor, and that is where we spin up the jobs containers. The daemon is running on the same executor. I don't know if this can be reworded somehow to leave out such details 😖 Maybe it doesn't matter for your purposes here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I wondered about this - so is the whole explanation of moving data aropund to make it accessible outdated now?

This section is there to point out differences (that users need to be aware of) around using docker compose and the docker executor as an alternative to using docker compose and the machine executor. If this info is now irrelevant I can just remove it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it does do that. It is perhaps a bit academic. I see the section has only moved as well. So, I'll give this a stamp

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 i am talking to a prospective customer and they pointed me to this paragraph as a reason for why they couldnt achieve the thing they wanted with remote docker.

i had the same reaction as you @DominicLavery which is that this wording is outdated because remote docker is basically machine now. if i open up a PR to edit the language, any guidance for what to remove Dom? definitley the pieces about "remote engine" and "remote docker daemon runs on a different system". any idea if the person still needs to do the docker cp stuff? i would assume no but the user i'm talking to said that it didnt work for them

"The issue I was referring to about docker is that as part of the deploy we run a command in a docker container (which has encapsulated some generic infrastructure setup) that requires as input a configuration file accessed via a bind mounted volume. Something like:

docker run -v ./config.yaml:/app/config.yaml ... image

This did not work"

also let me know if you want me to post and tag ask-execution for this question instead. the user did manage to get things working using docker cp so maybe that is still needed for some reason.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RE: docker cp
It doesn't really change anything around where the data lives. They still run in a primary docker container and so still might need to copy data around. A volume mount would occur on the hosts file system, not the primary containers so the config file or other data they would be after likely wouldn't be there

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#9170 lmk what you think

Copy link
Contributor

@sebastian-lerner sebastian-lerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@rosieyohannan rosieyohannan merged commit f17dcbb into master Nov 26, 2024
3 checks passed
@rosieyohannan rosieyohannan deleted the DOCSS-1621-docker-compose-updates branch December 3, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants