elgris / microservice-app-example

Example of polyglot microservice app
MIT License
1.4k stars 337 forks source link

Errors while building users-api within docker #1

Closed emwiechnik closed 6 years ago

emwiechnik commented 6 years ago

Hi, I am trying to run your project within Docker on Win10.

To get through I had to update todos-api\Dockerfile:line 8 - added ".js" in the path.

Then I bumped into an issue with users-api:

ERROR: Service 'users-api' failed to build: COPY failed: stat /mnt/sda1/var/lib/docker/tmp/docker-builder481249926/target/users-api-0.0.1-SNAPSHOT.jar: no such file or directory

I guess the build of the jar file is missing. There is info about building in microservice-app-example\users-api\README.md, but I have not been able to get it to work. Could you please apply the necessary corrections?

drGrove commented 6 years ago

@emwiechnik the dockerfile is expecting that you already compiled the target into a jar. You'll need to do that first

orasik commented 6 years ago

I have created a PR to fix this and do the build inside docker. Also, I have fixed some other issues like glide up to install go dependencies and fixed the missing .js extension

Fixing dependencies

elgris commented 6 years ago

3 is merged as well as a couple of other fixes. Everything is getting compiled when docker images are being built.