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

Comments

@absyah
Copy link

@absyah 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

This comment has been minimized.

Copy link
Owner

@mddanishyusuf mddanishyusuf commented Jul 30, 2019

I know one trick to remove all images.

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

@absyah

This comment has been minimized.

Copy link
Author

@absyah 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.