-
Notifications
You must be signed in to change notification settings - Fork 830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporal won't run on development containers #2755
Comments
Please try temporal's official docker compose: https://github.com/temporalio/docker-compose |
My repository is just a minimal version of that repo, but if you want to reproduce the bug only using original repositories, please, follow these steps: On Windows
On WSL
On Visual Studio Code
On development container terminal (on Visual Studio Code)
|
I work solely in dev containers and this is because of how bind mounts work with docker. The best option here to get this to work is to use the docker-compose variant of dev containers and push these services to the main docker-compose file. An example is here I’m hoping when this feature lands this will be simpler |
@jbreiding, unfortunately, that's far from the desired solution. I was opting for Docker in Docker because my application has almost 10 services running on containers, and I didn't want them to start along with the dev container itself (in fact, even when testing features, most of time one wouldn't even need to start all services at once) because developers don't need them all running on background while they're coding. Is there a way to prevent that? |
If you have the docker extension installed you can stop any of the containers if they are running and start then again when needed You can also not make the dev service dependent on the extra services and only identify the dev service to start. it’s actually pretty close to ideal and works well. If you insist on this path simply change the bind mounts to reference the fully qualified path accessible to your docker daemon. this is likely the full path to your workspace folder in wsl. The context path is coming from the container mapping so very likely ‘/workspace’ which is not available to the docker daemon. there are lots of options available to accomplish this. |
Thanks for explaining that. Could you clarify some questions I have on that behalf? How exactly one would accomplish not making the dev service dependent on extra services? Below is a version: '3.8'
volumes:
postgres-data:
null
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
VARIANT: 1.18-bullseye
NODE_VERSION: "lts/*"
env_file:
- .env
volumes:
- ..:/workspace:cached
command: sleep infinity
network_mode: service:db
db:
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
env_file:
- .env
Thanks again for clarifying the situation. |
I don't have a lot of experience running this way, but this may help you If you encounter any issues from there its best to get some community help from vscode dev containers team. You will likely find someone running a similar setup. |
I have tried compose profiles before, but unfortunately, anything that seems to stop services from auto-initializing (including
Dev containers, at least for now, just seem to be too much headache. I'll look for other alternatives. Thank you! Edit: In case anyone also stumbles on this problem, the discussion continues here. |
Expected Behavior
Temporal should work normally on a development container
Actual Behavior
Temporal does not work on a development container
Steps to Reproduce the Problem
Step-by-step better specified here.
1. Clone this repository and open it with Visual Studio Code;2. On VSCode terminal, rundocker-compose up
;3. Wait for Temporal container to be deployed;4. Watch Temporal work perfectly;5. Stop and delete the Docker container;6. On VSCode, pressF1
and typeRemote-Contianers: Rebuild and Reopen in Container
. Press enter;7. Wait for the development container to be fully deployed;8. On VSCode terminal (now running inside the dev container) rundocker-compose up
;9. Wait for about 1 minute and watch the servicetemporal
to exit with code1
;10. The logs says:Unable to create dynamic config client. Error: unable to validate dynamic config: dynamic config: config/dynamicconfig/development_sql_es.yaml: stat config/dynamicconfig/development_sql_es.yaml: no such file or directory
Specifications
The text was updated successfully, but these errors were encountered: