vfarcic / books-ms

145 stars 121 forks source link

Unable to build Dockerfile #20

Closed sunitjoshi closed 7 years ago

sunitjoshi commented 7 years ago

I'm following the DevOps guide (from lean pub) and I've already cloned the repos above. When trying to build the DockerFile using: docker build -t 10.100.198.200:5000/book-ms .

I get the following message since there are no .jar files:

Step 8 : COPY target/scala-2.10/books-ms-assembly-1.0.jar /bs.jar
lstat target/scala-2.10/books-ms-assembly-1.0.jar: no such file or directory

Any ideas what I'm doing wrong here ?

thanks Sunit

vfarcic commented 7 years ago

Most likely, you skipped the previous commands that run the tests or it failed. The JAR is created at the end of the testing process.

Feel free to ping me on Skype (user: vfarcic) or HangOuts (user: viktor@farcic.com) and I'll walk you through it.

sunitjoshi commented 7 years ago

It fails when running the tests with HTTP timeout error. Should I need to start the mongo one? I’m guessing not since its linked:

This is what I’ve for images created:

rgds Sunit

On Nov 27, 2016, at 5:07 PM, Viktor Farcic notifications@github.com wrote:

Most likely, you skipped the previous commands that run the tests or it failed. The JAR is created at the end of the testing process.

Feel free to ping me on Skype (user: vfarcic) or HangOuts (user: viktor@farcic.com mailto:viktor@farcic.com) and I'll walk you through it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vfarcic/books-ms/issues/20#issuecomment-263154679, or mute the thread https://github.com/notifications/unsubscribe-auth/ALV1_zuowTjaW-MLXSPdrlpRXvRUlpoLks5rCg0tgaJpZM4K88xr.

sunitjoshi commented 7 years ago

Get this now…

rgds Sunit

On Nov 27, 2016, at 5:07 PM, Viktor Farcic notifications@github.com wrote:

Most likely, you skipped the previous commands that run the tests or it failed. The JAR is created at the end of the testing process.

Feel free to ping me on Skype (user: vfarcic) or HangOuts (user: viktor@farcic.com mailto:viktor@farcic.com) and I'll walk you through it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vfarcic/books-ms/issues/20#issuecomment-263154679, or mute the thread https://github.com/notifications/unsubscribe-auth/ALV1_zuowTjaW-MLXSPdrlpRXvRUlpoLks5rCg0tgaJpZM4K88xr.

sunitjoshi commented 7 years ago

Still no luck…the earlier failures are not creating the jars :(

Removing intermediate container 093ea0c65419 Step 8 : COPY target/scala-2.10/books-ms-assembly-1.0.jar /bs.jar lstat target/scala-2.10/books-ms-assembly-1.0.jar: no such file or directory

rgds Sunit

On Nov 27, 2016, at 5:07 PM, Viktor Farcic notifications@github.com wrote:

Most likely, you skipped the previous commands that run the tests or it failed. The JAR is created at the end of the testing process.

Feel free to ping me on Skype (user: vfarcic) or HangOuts (user: viktor@farcic.com mailto:viktor@farcic.com) and I'll walk you through it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vfarcic/books-ms/issues/20#issuecomment-263154679, or mute the thread https://github.com/notifications/unsubscribe-auth/ALV1_zuowTjaW-MLXSPdrlpRXvRUlpoLks5rCg0tgaJpZM4K88xr.

vfarcic commented 7 years ago

If tests fail, JAR is not generated and the image cannot be built. We need to see why you get the timeout. Can I assume that you have decent bandwidth and that you are not behind any firewall?

Please ping me on Skype or HangOuts so that we can share your screen and take a look at it.

sunitjoshi commented 7 years ago

This is the last message where it’s been stuck for about 4 min:

Sunit

On Nov 29, 2016, at 7:19 AM, Viktor Farcic notifications@github.com wrote:

If tests fail, JAR is not generated and the image cannot be built. We need to see why you get the timeout. Can I assume that you have decent bandwidth and that you are not behind any firewall?

Please ping me on Skype or HangOuts so that we can share your screen and take a look at it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vfarcic/books-ms/issues/20#issuecomment-263567744, or mute the thread https://github.com/notifications/unsubscribe-auth/ALV1_-5kwhRxs5boafJW3nFeABXjCJy_ks5rDCZIgaJpZM4K88xr.

noelvillador commented 7 years ago

Hi,

When trying to follow the commands in the book and i can't get pass this command.

docker build -f Dockerfile.test -t 10.100.198.200:5000/books-ms-tests .

I'm always getting "e1000 0000:00:03.0 eth0: Reset adapter" on the "cd" docker container.

Any idea?

Machine is fedora 25, VirtualBox-5.1-5.1.12_112440_fedora25-1.x86_64 and vagrant-1.8.5-2.fc25.noarch

Here's my output log.

[success] Total time: 186 s, completed Jan 7, 2017 11:25:58 AM ---> f3715f03ce69 Removing intermediate container baf61b700140 Step 25 : RUN cd /source/client && npm install && bower install --allow-root --config.interactive=false -s ---> Running in 8c8e618825c2 npm WARN package.json tc-books@0.0.0 No description npm WARN package.json tc-books@0.0.0 No repository field. npm WARN package.json tc-books@0.0.0 No README data npm WARN package.json tc-books@0.0.0 No license field. npm WARN engine web-component-tester@6.0.0-prerelease.4: wanted: {"node":">= 4.0"} (current: {"node":"0.12.18","npm":"2.15.11"}) npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated node-uuid@1.4.7: use uuid module instead

vfarcic commented 7 years ago

I'm not sure I understood the part with Fedora.

Did you change Vagrantfile to use Fedora instead Ubuntu or you're trying to create Ubuntu VMs from inside a Fedora VM?

noelvillador commented 7 years ago

Sorry for the confusion. I'm creating Ubuntu VMs from a fedora desktop machine.

vfarcic commented 7 years ago

This is the first time I see that error. Judging by the output, the problem is with your VirtualBox installation. Can you check whether you are able to create VMs in general? You can create a sample Vagrant VM. That would tell us whether it is related to some specifics in the Vagrantfile used in the book or not. In either case, it is related to specifics of your OS or laptop.

noelvillador commented 7 years ago

I see, thanks for the tips. I agree that it might be related to the virtual box on fedora as I have successfully executed the command using osx.

vfarcic commented 7 years ago

Please let me know if you think there's something I can do to help or we can close this ticket.

vfarcic commented 7 years ago

Closing due to inactivity... Please reopen if you're still experiencing problems and you think I can help.

Voyagia commented 3 years ago

I am having similar problem: The "books-ms-assembly-1.0jar" was not created in ./scala-2.10 from the Test "books-ms-tests".

Test build (docker build) was successful. Test run (docker-compose) ended as below.

[info] Compilation completed in 167.766 s Mon Oct 19 [PeriodicTask::Runner] task: DBConnectionPool-cleaner took: 38ms Mon Oct 19 [PeriodicTask::Runner] task: WriteBackManager::cleaner took: 44ms Mon Oct 19 [PeriodicTask::Runner] task: DBConnectionPool-cleaner took: 121ms /usr/share/sbt-launcher-packaging/bin/sbt-launch-lib.bash: line 41: 76 Killed "$@"

vfarcic commented 3 years ago

@Voyagia This repo was made for a book and a few articles that are all obsolete now. They are all based on Docker products which, in the meantime, either died over time or transformed themselves into something very different. Docker Compose, for example, is (mostly) useless inside Kubernetes which fully replaced Docker Swarm.

Please let me know if you're running those examples by following one of my books (it's probably Devops 2.0 Toolkit which is our of sale for a few years now) and I'll send you a free copy of one of those that are relevant today.

Voyagia commented 3 years ago

Thank you Viktor for the quick reply.
Yes I am using DevOps 2.0 Toolkit , I know I am late to the party :-) The book may be dated but great for beginners.

vfarcic commented 3 years ago

I feel bad that you are going through my material that is not maintained anymore and probably has quite a few parts that do not work. If you can send me a private message (e.g., Twitter @vfarcic), I'll send you a coupon for a free copy of "The DevOps 2.3 Toolkit: Kubernetes". I believe it is a much better start than 2.0.