Development containers

Posted on 2024-01-02 in Programmation • Tagged with Docker

I recently discovered the dev containers standard (or development containers for long) recently after trying to contribute to a project which had them enabled by default. It seems to be a new standard way to work with containers in development.

The goal is to provide a container you can use …


Continue reading

Manage deployment transitions for static application

Posted on 2021-04-25 in Trucs et astuces • Tagged with Docker, Kubernetes

When you deploy a frontend app, most of the time the name of your assets contains their hash so you can easily cache the files. So instead of just having main.js you will have something like main.1234.js. The problem is that your HTML will reference main.1234 …


Continue reading

Run multiple docker daemons on the same host

Posted on 2018-02-25 in Programmation • Tagged with Docker, Linux

Today I am going to explain how you can run multiple docker daemons on the same host. This can be useful if you want several users to use docker and want each of them to be isolated from one another (ie don't see images, containers, … of other users). The solution …


Continue reading

Can we clean password from PHP memory?

Posted on 2017-11-26 in Programmation • Tagged with php, Docker, security

At work in a PHP application, we rely on libsodium to erase a password from $_POST. It may sound like a good idea: once the password is not in memory any more, it can't leak. But the question is: is it really erased from memory? That's the question will answer …


Continue reading

Use Linux user namespaces to fix permissions in docker volumes

Posted on 2017-07-02 in Programmation • Tagged with Docker, Unix

Not long ago, I publish an article about using Unix sockets with docker. These sockets where in docker volumes so they could be shared between various containers. The key idea was to change the …


Continue reading

Docker compose tips

Posted on 2017-06-11 in Trucs et astuces • Tagged with Docker, Docker compose

For my tips about docker, go here.

Use docker-compose.override.yml

As describe here, if you create a docker-compose.override.yml next to your docker-compose.yml, you can override or add values to the docker file. This file is loaded by default. To ignore it …


Continue reading

Use Unix sockets with Docker

Posted on 2017-02-15 in Programmation • Tagged with Docker, Unix

By default, you are supposed to use TCP sockets to communicate with your applications running in Docker. But what if you want to use Unix sockets instead? The answer is you can: you make the application create the socket file in a volume and set the proper permissions to it …


Continue reading

Use docker to deploy a Glassfish application

Posted on 2015-05-24 in Programmation • Tagged with Java, Glassfish, Docker

Recently I had to deploy an application on Glassfish. Since Glassfish is not packaged on the distribution I have on my server (Fedora Server) and I wanted to avoid to pollute my system I decided to use Docker.

In order to deploy my application correctly, I based my Dockerfile on …


Continue reading

Docker tips

Posted on 2015-05-24 in Trucs et astuces • Tagged with Docker

For my tips about docker compose, go here.

Create an image

docker build -t <name> .

Save and import

docker save <image> > file
docker load < <image>

Run

docker run --name …

Continue reading

Connect to a running docker container

Posted on 2015-03-25 in Trucs et astuces • Tagged with Docker

If you are running docker 1.3 or above, you should use: docker exec -it CONTAINER COMMAND to run COMMAND within the container. You can easily create a function to ease the thing and run bash by default:

dk-enter() {
    docker exec -it "$1" "${2:-/bin/bash}"
}

Otherwies, you can easily …


Continue reading