Docker entrypoint and cmd together

When you use both entrypoint and command, the command section will be appended to entrypoint executable as arguments. Thus in your case: ENTRYPOINT [“/start.sh”] CMD [“aptly”, “api”, “serve”] Is equivalent to running: ENTRYPOINT[“/start.sh”, “aptly”, “api”, “serve”]

How do you manage per-environment data in Docker-based microservices?

Docker compose supports extending compose files, which is very useful for overriding specific parts of your configuration. This is very useful at least for development environments and may be useful in small deployments too. The idea is having a base shared compose file you can override for different teams or environments. You can combine that … Read more

How to view docker logs from vscode remote container?

I’m not using remote containers, just local once, so not sure if this applies but for locally running containers, you can go to the “Docker” tab (you need to install the official Microsoft Docker VS Code Plugin) where you can see your running containers. Just right-click on the container you want to see the logs … Read more

Docker compose port forwarding not working properly

In my case, I was using docker-compose run without the –service-ports argument, so port mappings were ignored. Example: docker-compose.yml version: “3” services: app-host: image: nginx:1.19.0-alpine working_dir: /app volumes: – ./:/app/ ports: – “80:3000” command docker-compose run –service-ports app-host References: discussion forum docker-compose documentation