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 use docker #1

Open
ksmt88 opened this issue Aug 31, 2018 · 0 comments
Open

How to use docker #1

ksmt88 opened this issue Aug 31, 2018 · 0 comments

Comments

@ksmt88
Copy link
Owner

ksmt88 commented Aug 31, 2018

How to use docker

get an image

# docker pull {repository}
docker pull localhost:5000/test:1.0

create an image from container

# docker commit -m "{comment}" {container ID} test:1.0
docker commit -m "test" fbe9f9e05780 test:1.1

create container

# docker run -it -d {image ID}
docker run -it -d 16508e5c265d

login to container

# docker exec -it {container ID} bash
docker exec -it fbe9f9e05780 bash

add a tag

# docker image tag {image ID} {repository}
docker image tag 16508e5c265d localhost:5000/test:1.0

register docker registry

# docker push {repository}
docker push localhost:5000/test:1.0

copy

# to container
# docker cp {path} {container ID}:{path}
docker cp /tmp fbe9f9e05780:/tmp
# to host
# docker cp {container ID}:{path} {path}
docker cp fbe9f9e05780:/tmp /tmp
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

No branches or pull requests

1 participant