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

Docker build failing #268

Closed
DavoSwain opened this issue Aug 3, 2021 · 8 comments · Fixed by #286
Closed

Docker build failing #268

DavoSwain opened this issue Aug 3, 2021 · 8 comments · Fixed by #286
Labels
kind/question Further information is requested

Comments

@DavoSwain
Copy link

Having an issue with the docker build on the hello world example, getting the following feedback:

#9 5.446 Downloading vm_service 7.2.0...
#9 125.7 Connection closed before full header was received

executor failed running [/bin/sh -c dart pub get]: exit code: 69

Any suggestions on a fix?

@kevmoo
Copy link
Collaborator

kevmoo commented Aug 26, 2021

I'd try again. Seems like a networking issue...

@kevmoo kevmoo added the kind/question Further information is requested label Aug 26, 2021
@Mooibroek
Copy link

Mooibroek commented Sep 12, 2021

Also running into a docker build failure.
Steps to reproduce:

  • Creating a helloworld application,
  • Running dart run bin/server.dart works fine locally
  • Running docker build . and after that docker run [container_name]

This error pops up:

standard_init_linux.go:228: exec user process caused: no such file or directory

Any thoughts?

On cloud deploy I get the following error (not sure if its the same of a different error)
image

@kevmoo
Copy link
Collaborator

kevmoo commented Sep 12, 2021

I just did

docker build -t dart-server .
run -it --rm -p 8080:8080 --name myserver dart-server

no problem.

If you try to run /bin/sh or similar that will fail because that command does not exist in the compiled image. It's from scratch which is tiny

@kevmoo kevmoo closed this as completed Sep 12, 2021
@weenzeel
Copy link

weenzeel commented Sep 12, 2021

I'm also getting the "standard_init_linux.go:228: exec user process caused: no such file or directory" error message as reported by @Mooibroek above.

Steps to reproduce.

Run dartfn generate helloworld in a new folder.

As instructed by the README file. Run commands ...

docker build -t hello .
docker run -it -p 8080:8080 --name app hello

I'm on MacOS.

@weenzeel
Copy link

@Mooibroek If you created your project via the dartfn tool it may be that you've got a faulty docker file. Try and add a line similar to ...

COPY --from=0 /runtime/ /

to get the runtime needed by the server in the final runt-time Docker image.

@kevmoo
Copy link
Collaborator

kevmoo commented Sep 13, 2021

We clearly need to fix something here...will take a look!

@kevmoo kevmoo reopened this Sep 13, 2021
@kevmoo
Copy link
Collaborator

kevmoo commented Sep 13, 2021

CC @subfuzion

subfuzion added a commit that referenced this issue Sep 13, 2021
Fixes #268.
Update Dockerfiles to match examples.
Improve bash helpers for dev.
Bump dartfn to v0.4.3.
subfuzion added a commit that referenced this issue Sep 13, 2021
Fixes #268.
Update Dockerfiles to match examples.
Improve bash helpers for dev.
Bump dartfn to v0.4.3.
kevmoo pushed a commit that referenced this issue Sep 13, 2021
Fixes #268.
Update Dockerfiles to match examples.
Improve bash helpers for dev.
Bump dartfn to v0.4.3.
@kevmoo
Copy link
Collaborator

kevmoo commented Sep 13, 2021

This is now fixed – thanks to @subfuzion – update dartfn and you should be good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants