Tag: docker

Do you know the preferred Docker compose file name?

I've been using Docker for... a long time now. So having a docker-compose.yml file in a project is pretty natural and common for me.

Today I learned that the preferred file is now compose.yaml (though compose.yml is also allowed), and that the docker-compose naming is only supported for backwards compatibility. (See the Compose file documentation if you don't believe me!)

Funny enough, the compose tooling doesn't call this out, even though it now calls out the fact you don't need to use the version setting any more.

Continue reading...

Copy A File From A Docker Container to the Host

Occasionally, I want to get a file from a Docker container back to the host system.

First, you need to get the container ID; you can do this using docker ps. Once you have that, use, docker cp as follows:

docker cp <containerId>:/path/to/file/in/container path/on/host

Continue reading...

Fixing Redis background-save issues on Docker

I've been running redis in Docker for a number of sites, to perform things such as storing session data, hubot settings, and more.

I recently ran into a problem on one of my systems where it was reporting:

Can't save in background: fork: Out of memory

Continue reading...

Building a usable ext-tidy for Alpine-based PHP Docker images

I've been working on building PHP Docker images for the purposes of testing, as well as to potentially provide images containing the Swoole extension. This is generally straight-forward, as the official PHP images are well-documented.

This week, I decided to see if I could build Alpine-based images, as they can greatly reduce the final image size. And I ran into a problem.

Continue reading...