I lose my data when the container exits

You need to commit the changes you make to the container and then run it. Try this: sudo docker pull ubuntu sudo docker run ubuntu apt-get install -y ping Then get the container id using this command: sudo docker ps -l Commit changes to the container: sudo docker commit <container_id> iman/ping Then run the container: … Read more

What’s the difference between Docker Compose and Kubernetes?

Containers: Containers are at the core of the other technologies listed here Docker: Docker is a popular implementation of the technology that allows applications to be bundled into a container. docker is a command-line tool to manage images, containers, volumes, and networks Docker Compose Docker Compose is the declarative version of the docker cli It … Read more

How can I add a volume to an existing Docker container?

You can commit your existing container (that is create a new image from container’s changes) and then run it with your new mounts. Example: $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5a8f89adeead ubuntu:14.04 “/bin/bash” About a minute ago Exited (0) About a minute ago agitated_newton $ docker commit 5a8f89adeead newimagename … Read more

Exposing a port on a live Docker container

You cannot do this via Docker, but you can access the container’s un-exposed port from the host machine. If you have a container with something running on its port 8000, you can run wget http://container_ip:8000 To get the container’s IP address, run the 2 commands: docker ps docker inspect container_name | grep IPAddress Internally, Docker … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)