elkozmon / zoonavigator

Web-based ZooKeeper UI / editor / browser
https://zoonavigator.elkozmon.com
GNU Affero General Public License v3.0
506 stars 72 forks source link

how can i build the docker images locally? #4

Closed babatundebusari closed 7 years ago

babatundebusari commented 7 years ago

is there any way i can build the docker images used locally?

thanks

elkozmon commented 7 years ago

Sure! The way I do it requires sbt and npm (along with angular-cli) to be installed.

First clone both API and Web repositories. Both already contain a dockerfile but you need to make the sbt/npm production build first. You can do that like so:

API

sbt clean play/stage
docker build -t zoonavigator-api .

Web

npm install -g @angular/cli
npm install
ng build --prod
docker build -t zoonavigator-web .

However, the last time I tried to build the Web project it failed presumably due to incompatibility with the newer versions of the dependencies. I intend to fix this in the next days.

elkozmon commented 7 years ago

You should be good to go as Web client npm build now works correctly.

babatundebusari commented 7 years ago

@elkozmon ok great...will check it out thanks!

nhuray commented 7 years ago

@elkozmon In order to simplify your build process you should take a look to the multi-stage build released recently in Docker.

elkozmon commented 7 years ago

@nhuray thanks for the tip, I will check it out

elkozmon commented 7 years ago

@babatundebusari no problem, please let me know if there are any problems

elkozmon commented 6 years ago

Hi, I just wanted to let you all know that Docker images can now be built without sbt/npm first building the project. @nhuray thanks for suggesting the multi-stage build!