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

How to run data-only container with docker-compose? #1751

Closed
winggundamth opened this issue Jul 22, 2015 · 4 comments
Closed

How to run data-only container with docker-compose? #1751

winggundamth opened this issue Jul 22, 2015 · 4 comments

Comments

@winggundamth
Copy link

My yaml file

app:
    image: httpd
    volumes:
        - /var/log
data:
    image: tianon/true
    volumes_from:
        - app

When I run with docker-compose

$ docker-compose -f app.yml up
Creating compose_app_1...
Creating compose_data_1...
Attaching to compose_app_1, compose_data_1
app_1  | AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.19. Set the 'ServerName' directive globally to suppress this message
app_1  | AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.19. Set the 'ServerName' directive globally to suppress this message
app_1  | [Wed Jul 22 06:38:22.368277 2015] [mpm_event:notice] [pid 1:tid 140181165893504] AH00489: Apache/2.4.16 (Unix) configured -- resuming normal operations
app_1  | [Wed Jul 22 06:38:22.368385 2015] [core:notice] [pid 1:tid 140181165893504] AH00094: Command line: 'httpd -D FOREGROUND'
compose_data_1 exited with code 0
Gracefully stopping... (press Ctrl+C again to force)
Stopping compose_app_1...
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):

What exactly docker-compose suggested how to run data-only container?

@winggundamth winggundamth changed the title How to run data container with docker-compose? How to run data-only container with docker-compose? Jul 22, 2015
@dnephin
Copy link

dnephin commented Jul 22, 2015

Add -d

docker-compose -f app.yml up -d; docker-compose logs

@dnephin
Copy link

dnephin commented Jul 22, 2015

Related #741

@winggundamth
Copy link
Author

Thanks. That's solve my problem :)

@aanand
Copy link

aanand commented Jul 22, 2015

#1754 should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants