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

document volume mounting and docker-compose options #153

Closed
seanstory opened this issue Oct 17, 2024 · 2 comments
Closed

document volume mounting and docker-compose options #153

seanstory opened this issue Oct 17, 2024 · 2 comments
Labels
complexity:low documentation Improvements or additions to documentation enhancement New feature or request priority:medium

Comments

@seanstory
Copy link
Member

Problem Description

There are a lot of ways to start a docker container that needs a local file. Currently, we document doing it with docker run and docker cp like:

$ docker run -i -d \
  --network elastic \
  --name crawler \
  docker.elastic.co/integrations/crawler:0.2.0
$ docker cp config/my-crawler.yml crawler:app/config/my-crawler.yml
$ docker exec -it crawler bin/crawler crawl path/to/my-crawler.yml

But small changes to any of these commands might lead to unexpected results, especially if you don't fully appreciate what you changed.

To add some more safety net, we can document alternative methods too, so that if one doesn't work for a user, they don't have to go digging through docker docs to figure out how to do it differently.

Proposed Solution

Provide an example docker-compose.yml like:

services:
  elastic-open-web-crawler:
	image: docker.elastic.co/integrations/crawler:0.2.0
	stdin_open: true
	volumes:
  	- ${PWD}/crawler-config.yml:/app/config/crawler-config.yml:ro

which could be started with:

$ docker compose exec elastic-open-web-crawler bin/crawler crawl /app/config/crawler-config.yml
@seanstory seanstory added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 17, 2024
@ugosan
Copy link
Contributor

ugosan commented Oct 17, 2024

I believe mounting volumes on containers is preferable over copying files, at least the former is a much more common practice than the latter.

@navarone-feekery
Copy link
Collaborator

We have a docker-compose now. I also removed references to copying config alongside this PR that introduced the latestdocker tag: #214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:low documentation Improvements or additions to documentation enhancement New feature or request priority:medium
Projects
None yet
Development

No branches or pull requests

3 participants