Hacker Newsnew | past | comments | ask | show | jobs | submit | maximization's commentslogin

Compose allows you to configure volumes using a short syntax format: `[SOURCE:]TARGET[:MODE]`

In practice, this leads to different string variations. Every time I read a docker-compose.yml file, I had to refer to the docs or run a quick test to figure out if a volume or a bind mount is used. I wrote a short guide so I wouldn't have to look this stuff up anymore and be able to memorise it by heart.

The gist of it is:

1. No source -> anonymous volume

2. Non-path source -> named volume (defined in a top-level `volumes` key)

3. Relative or absolute path source -> bind mount

Hope this helps some of you out there that trip over this syntax like me.

Stay home and be safe!


When you put an application in a container, something that often breaks is the connection to the database and other services. If you're struggling to get two containers to talk to each other, you can try these 4 troubleshooting steps to quickly fix your issue. In short:

- Containers should be in the same network

- Connecting to a container by its name isn't possible in the default network, create on of your own instead

- Make sure you are using the correct IP address

- The network should have ICC enabled (it does by default)

In the article, I elaborate a little bit more on each bullet point and show you a solution. This isn't a comprehensive list, but hopefully it helps some folks who have already spent several hours debugging their issues.


HN doesn't allow to have a url and text on HN posts. I had to choose one. Would an external link have been a better fit?


I'm used to clicking on heading and it takes me to external resource. This is not the case here.


An iPad is great for drawing image assets that you can use however you want because they're yours. This is great for authors of different kinds.

As an author it's hard to find relevant images for your articles, let alone images with permissive licenses. Drawing them yourself takes up more time but it has several benefits:

- You're free to use them however you want

- They're highly customised (and relevant) for your content

- Ditch the "stock photos" look on your pages

- Add a personal touch to the way you communicate


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: