TL;DR Image built by VSCode only executes the CMD command when I press the Run button in the Docker Desktop UI.
Hello Folks,
I'm playing around with a Drools image along with Docker Desktop and VSCode.
My devcontainer.json
file looks like the following:
{
"name": "Existing Dockerfile",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8001,8080]
}
My Dockerfile
is minimalist and looks like the following:
FROM quay.io/kiegroup/business-central-workbench:latest
And my compose.yaml
file looks like so:
services:
app:
entrypoint:
- sleep
- infinity
image: docker/dev-environments-default:stable-1
init: true
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
The issue is that when VSCode sends the image to Docker Desktop, the
CMD ["./start_business-central-wb.sh"]
found in the parent image does not seem to be getting set off as seen in the logs
However, when I click "Run" the command gets kicked off after spawning a new instance
What concept am I missing as to why the Docker image doesn't immediately begin running when VSCode sends it to Docker Desktop? I'm super inexperienced with both techs.
Any help is greatly appreciated.