Skip to content
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

Building workspace from custom recipe results in "Docker image build failed" #919

Closed
moollaza opened this issue Oct 6, 2016 · 3 comments

Comments

@moollaza
Copy link

moollaza commented Oct 6, 2016

I am new to CodeEnvy and still trying to understand how all this works. I'm trying to build a workspace from a custom recipe, which is a Dockerfile.

The dockerfile I'm using is available here: https://github.com/duckduckgo/duckpan-docker/blob/master/Dockerfile

When building the workspace it begins executing the Dockerfile successfully but after the last step, CodeEnvy throws an "Start Workspace Error":

Could not start workspace DDH. Reason: Start of environment DDH failed. Error: Docker image build failed. Image id not found in build output.

Another run with a different workspace name produces a different error:

Could not start workspace DuckPAN-Docker. Reason: Start of environment DuckPAN-Docker failed. Error: Can't detect container user ids to chown backed up files of workspace workspacejyhnu1punwg8qfp3

Reproduction Steps:

  1. Click "Add Workspace"
  2. Select "Custom Stack"
  3. Enter "Recipe URL": https://raw.githubusercontent.com/duckduckgo/duckpan-docker/master/Dockerfile (or copy/paste into "Write your own stack" textbox)
  4. Select "Dockerfile" for "Recipe Type"
  5. Click "Create Workspace"
  6. Click "Open"
  7. Wait...

Expected behavior:

Workspace is successfully created with a brewed Perl, plus App::DuckPAN

Observed behavior:

CodeEnvy shows an error dialogue indicating that the workspace was not successfully created. After closing the dialogue the workspace has no available terminal. Switching to "Operations Perspecting" shows:

Machine <name> not found

Codenvy version: [Enter Codenvy version here]
OS and version: OSX 10.12
Browser: Chrome 53.0.2785.116 (64-bit)

Additional information:

Problem can be reliably reproduced: Yes

Diagnostic bundle
Execute the script on this page and post public link to the bundle here.

Unable to access the terminal from the failed state...

@TylerJewell
Copy link
Contributor

@moollaza - thanks for getting involved with Codenvy. First, have you been able to build your dockerfile locally - with `docker build ."?

Second, I do notice that there are a few issues with the Dockerfile. It's likely that our system which is taking your Dockerfile syntax is failing in the build portion of the exercise. So if we cannot build it, then we cannot launch it.

One thing that I did notice is that you are not ending your Dockerfile with a non-terminating command. We need that otherwise after we launcher your container, it will exit immediately. See the example here - https://eclipse-che.readme.io/v5.0/docs/recipes#section-che-runtime-required-dependencies.

@moollaza
Copy link
Author

moollaza commented Oct 24, 2016

@TylerJewell thanks for the help, and sorry for the late reply. Somehow I didn't get a notification!

Everything seems to be working now. I added a non-terminating command, verified that docker build run successfully, and was able to build a new workspace from the Dockerfile.

Thanks again!

@TylerJewell
Copy link
Contributor

Excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants