Skip to content

update docs with example for local-only usage #164

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

Closed
sam-goodwin opened this issue May 1, 2024 · 4 comments · Fixed by #342
Closed

update docs with example for local-only usage #164

sam-goodwin opened this issue May 1, 2024 · 4 comments · Fixed by #342
Assignees
Labels
docs Improvements or additions to documentation

Comments

@sam-goodwin
Copy link

I am trying to run the getting started command within my repo. I don't want to pull from git, I just want to build the image from my local file system with a locally cloned repository.

Have tried this:

docker run -it --rm \
  -v /tmp/envbuilder:/workspaces \
  -e DEVCONTAINER_DIR=.devcontainer \
  -e DEVCONTAINER_JSON_PATH=.devcontainer/devcontainer.json \
  ghcr.io/coder/envbuilder

No matter what I do, I get this error:

error: no Dockerfile or devcontainer.json found: no fallback image has been specified
error: no Dockerfile or devcontainer.json found: no fallback image has been specified

From the docs, it is not clear how to use this tool from a local git repository. It always assumes a hosted repo which is not what I am trying to do.

@coder-labeler coder-labeler bot added the docs Improvements or additions to documentation label May 1, 2024
@sam-goodwin
Copy link
Author

sam-goodwin commented May 1, 2024

Think I've found a workaround with a custom Dockerfile

FROM ghcr.io/coder/envbuilder

ENV WORKSPACE_FOLDER /workspaces

COPY .devcontainer /workspaces/.devcontainer

@sam-goodwin
Copy link
Author

I genuinely have no idea how to use this tool without having a public Git repository and using GIT_URL which is meant to be optional. I think the docs could use some more examples.

@johnstcn johnstcn changed the title no Dockerfile or devcontainer.json found: no fallback image has been specified update docs with example for local-only usage Aug 29, 2024
@johnstcn
Copy link
Member

The simplest way I've found to do this is to simply mount the repository to /workspaces/empty.

@johnstcn
Copy link
Member

Fixed in #342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants