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 Basic Commands #88

Open
absyah opened this issue Jul 29, 2019 · 2 comments
Open

Docker Basic Commands #88

absyah opened this issue Jul 29, 2019 · 2 comments
Assignees
Labels
coding dailyhack This issue belongs to dailyhack.xyz other

Comments

@absyah
Copy link

absyah commented Jul 29, 2019

These docker commands are that I use every single day

# show containers
docker ps

# Logging to container
docker logs -f <container_id>

# ssh to container
docker exec -it <container_id> /bin/bash

# build container
docker-compose build [container_name_on_yml]

# run container
docker-compose up [container_name_on_yml]

# run rails console on container
docker-compose run <container_name_on_yml> rails c

# remove all images
docker rmi -f $(docker images -a -q)

Please let me know your other docker's daily hacks! 🥇

@mddanishyusuf mddanishyusuf added coding dailyhack This issue belongs to dailyhack.xyz other labels Jul 30, 2019
@mddanishyusuf
Copy link
Owner

I know one trick to remove all images.

docker rmi -f $(docker images -a -q)

@absyah
Copy link
Author

absyah commented Jul 30, 2019

I added your hack accordingly. Thanks @mddanishyusuf !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coding dailyhack This issue belongs to dailyhack.xyz other
Projects
None yet
Development

No branches or pull requests

2 participants