docker stack: setting environment variable from secrets

To elaborate on the original accepted answer, just change your docker-compose.yml file so that it contains this as your entrypoint: version: “3.7” services: server: image: alpine:latest secrets: – test entrypoint: [ ‘/bin/sh’, ‘-c’, ‘export TEST=$$(cat /var/run/secrets/test) ; source /entrypoint.sh’ ] secrets: test: external: true That way you don’t need any additional files!

docker-compose tmpfs not working

I have been doing some testing in this regards, it looks like the /var/run directory is special in docker. Here is some sample config and output: ubuntu: image: ubuntu command: “bash -c ‘mount'” tmpfs: – /var/run – /var/cache Running docker-compose up ubuntu shows what is mounted. Can see /var/cache is mounted but /var/run isn’t. … … Read more

Docker-compose: /usr/local/bin/docker-compose : line 1: Not: command not found

UPDATE: 20230829 Fixed Automating download of latest release of docker-compose Last update of curl apparently didn’t like my script to automate the download of the latest release of docker-compose. So here’s the re-jiggered script which is tested and known to work with Ubuntu 22.04.3. Since GitHub doesn’t like IPv6, I forced IPv4 in the curl … Read more

What is the difference between docker-machine and docker-compose?

Docker is the command-line tool that uses containerization to manage multiple images and containers and volumes and such — a container is basically a lightweight virtual machine. See https://docs.docker.com/ for extensive documentation. Until recently Docker didn’t run on native Mac or Windows OS, so another tool was created, Docker-Machine, which creates a virtual machine (using … Read more

local development of microservices, methods and tools to work efficiently

I’ve had a fair amount of experience with microservices and local development and here’s been some approaches I’ve seen: Run all the things locally on docker or k8. If using k8, then a tool like skaffolding can make it easier to run and debug a service locally in the IDE but put it into your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)