Workspaces no longer can be created

Since yesterday I have not been able to create any workspaces or pre-builds and they are all using base images for Elixir.

For example in this case

---
# Pick the official Elixir image from DockerHub
image: elixir:1.12

This is the same no matter which of my repos I choose and which Elixir image they select.

The workspace build log for the above case is as follows:

Connecting to workspace logs...
Connecting to log output ...
Connected to log output ...
{
sudo -E /app/bob build
}; exit
bash-5.1$ {
> sudo -E /app/bob build
> }; exit
{"level":"debug","message":"buildkitd started","serviceContext":{"service":"bob","version":""},"severity":"DEBUG","stderr":"/tmp/buildkitd_stderr747568794","stdout":"/tmp/buildkitd_stdout3704296256","time":"2021-12-04T07:46:50Z"}
{"attempt":0,"level":"debug","message":"attempting to connect to buildkitd","serviceContext":{"service":"bob","version":""},"severity":"DEBUG","time":"2021-12-04T07:46:50Z"}
{"attempt":1,"level":"debug","message":"attempting to connect to buildkitd","serviceContext":{"service":"bob","version":""},"severity":"DEBUG","time":"2021-12-04T07:46:51Z"}
{"level":"info","message":"building workspace image","serviceContext":{"service":"bob","version":""},"severity":"INFO","time":"2021-12-04T07:46:51Z"}
{"level":"info","message":"waiting for build context","serviceContext":{"service":"bob","version":""},"severity":"INFO","time":"2021-12-04T07:46:51Z"}
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 68B done
#1 DONE 0.3s

#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.3s

#3 [internal] load metadata for localhost:8080/base:latest
#3 ERROR: failed to read expected number of bytes: unexpected EOF
------
 > [internal] load metadata for localhost:8080/base:latest:
------
Dockerfile:1
--------------------
   1 | >>> FROM localhost:8080/base:latest
--------------------
error: failed to solve: localhost:8080/base:latest: failed to read expected number of bytes: unexpected EOF
{"@type":"type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent","command":"build","error":"exit status 1","level":"error","message":"build failed","serviceContext":{"service":"bob","version":""},"severity":"ERROR","time":"2021-12-04T07:46:57Z"}
exit
exit

Error: image build did not produce a workspace image

Another case where there is no .dockerignore file in the repo produces:

Connecting to workspace logs...
Connecting to log output ...
Connected to log output ...
{
sudo -E /app/bob build
}; exit
bash-5.1$ {
> sudo -E /app/bob build
> }; exit
{"level":"debug","message":"buildkitd started","serviceContext":{"service":"bob","version":""},"severity":"DEBUG","stderr":"/tmp/buildkitd_stderr747568794","stdout":"/tmp/buildkitd_stdout3704296256","time":"2021-12-04T07:46:50Z"}
{"attempt":0,"level":"debug","message":"attempting to connect to buildkitd","serviceContext":{"service":"bob","version":""},"severity":"DEBUG","time":"2021-12-04T07:46:50Z"}
{"attempt":1,"level":"debug","message":"attempting to connect to buildkitd","serviceContext":{"service":"bob","version":""},"severity":"DEBUG","time":"2021-12-04T07:46:51Z"}
{"level":"info","message":"building workspace image","serviceContext":{"service":"bob","version":""},"severity":"INFO","time":"2021-12-04T07:46:51Z"}
{"level":"info","message":"waiting for build context","serviceContext":{"service":"bob","version":""},"severity":"INFO","time":"2021-12-04T07:46:51Z"}
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 68B done
#1 DONE 0.3s

#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.3s

#3 [internal] load metadata for localhost:8080/base:latest
#3 ERROR: failed to read expected number of bytes: unexpected EOF
------
 > [internal] load metadata for localhost:8080/base:latest:
------
Dockerfile:1
--------------------
   1 | >>> FROM localhost:8080/base:latest
--------------------
error: failed to solve: localhost:8080/base:latest: failed to read expected number of bytes: unexpected EOF
{"@type":"type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent","command":"build","error":"exit status 1","level":"error","message":"build failed","serviceContext":{"service":"bob","version":""},"severity":"ERROR","time":"2021-12-04T07:46:57Z"}
exit
exit

Error: image build did not produce a workspace image

Prior to this I was really enjoying using GitPod as I move from machine to machine frequently.

Hope this is clear and equally, easy to resolve.
Thanks in advance
Dokie

Hi @dokie! Welcome, thanks for supporting Gitpod :blush:

I think that other users had a similar issue to you, it might be worth checking out this thread: Unable to open workspaces that use custom Docker image

Hi @Pauline

Yes I followed through that thread but I cannot see that is the same issue. If it is then I’m still not sure what I have to do to resolve it from reading the posts. Any help would be gratefully received.

Dokie

It seems that if I add a layer of indirection by setting in my .gitpod.yml file

image:
  file: .gitpod.Dockerfile

and add then a rather minimal file .gitpod.Dockerfile as

FROM elixir:1.13

then my workspace can be built. Whilst this is a workaround I’m not sure why I have needed to do this as a result of some recent GitPod changes. I was wondering if it is related to this issue?

1 Like