Skip to main content
Version: 6.x (Latest)

Change Working Directory Of Dev Containers

The working directory is the folder inside the container's filesystem where the entrypoint command is executed and where (by default) terminal sessions start. To change the working directory, specify the workingDir field.

devspace.yaml
dev:
backend:
imageSelector: ghcr.io/org/project/image
devImage: ghcr.io/loft-sh/devspace-containers/python:3-alpine
command: ["npm"]
args: ["run", "start"]
workingDir: /app/dev

Config Reference

workingDir required string

WorkingDir can be used to override the working dir of the container