Comments on Docker: How to use it in a practical way - Part 3

In this part, we will start using Docker images and create containers in a practical way. In other words, we will create a web-based, advanced personal notepad that runs on top of DokuWiki or WordPress. You can choose whichever you are comfortable with.

10 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: mortenb

Nice article.

Add your user to the docker group so you do not have to run everything as root with sudo.

also 'docker ps -a' is important to see all not running containers, because it is always a lot of cleaning up.

also --restart=always to autostart your images after a reboot is nice. no need to write a startupscript :-)

 

By: akash

how to run this on AWS?

By: satimis

On running following command:-

$ sudo docker run --name=mynotepad -p 80:80 -p 443:443 bitnami/wordpressERROR ==> The WORDPRESS_DATABASE_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development.

Please advise how to fix it.  Thanks

satimis

By: @satimis

@satimis Same error at my place...

By: @satimis

@satimistry another image, worked out for me:docker pull wordpressdocker run --name=mynotepad -p 8081:80 -p 443:443 wordpresshttp://localhost:8081

By: Jeroen

@webmaster

In the section "Containers are ephemeral"

This paragraph: "By design Docker containers are ephemeral. By “ephemeral,” we mean that a container can be stopped and destroyed and a new one can be built from the same Docker image and put in place with an absolute minimum of set-up and configuration."  is writen twice.

Also, nice article. Good info, it helped me out allot.

By: till

Thank you for the notice. I've fixed that.

By: Anon

do:

sudo docker run --name=mynotepad -p 80:80 -p 443:443 -e ALLOW_EMPTY_PASSWORD=yes bitnami/wordpress

Worked for me

By: Cog

this fixed the issue there for me too, but the setup process did not complete because I then got the following error

```

mysql-c INFO  Trying to connect to MySQL server

Error executing 'postInstallation': Failed to connect to mariadb:3306 after 36 tries

```

By: Hugh

The command -- sudo cd /var/lib/docker -- can't work.  cd is an internal shell command which cannot be executed.   Suggestion

sudo -s

cd /var/lib/docker

...

ls

exit