If you ever encounter a Linux dir in which you cannot write even when you're sure you have write permissions on it, check the ACLs. You may find someone doesn't particularly like you. 😞
-> getfacl /tmp # file: tmp # owner: root # group: root # flags: --t user::rwx group::rwx other::rwx user:my_user:--- # this means "screw u and only u"
It is common to have multiple services listed in the docker-compose file, sometimes with dependencies, but also, a normal workflow sometimes is to just start everything, like:
docker-compose -f docker-compose.yml -d
And it will start all servies listed with their dependencies, but, what happens if you need to add another service and you do not need it to start along with the rest? The answer is: profiles:
services: db: image: pg cache: image: redis rails: depends_on: - db - cache command: puma sidekiq: profiles: [ 'jobs' ] depends_on: - db - cache command: sidekiq
So, in this case, whenever you do
docker-compose up -d it will start only rails with its dependencies: db and cache, it wont start sidekiq by default, but if you really want to start sidekiq, then you need to explicitly type it:
docker-compose up sidekiq -d.