Closed caduvieira closed 6 years ago
Forgot to mention the size reduction. From 373M to 178M
Thanks @caduvieira, that seem to be really good!
As @cuducos said that he want to test by himself, I'll let him properly test, but if he doesn't do that I'll test it later :)
As @cuducos said that he want to test by himself, I'll let him properly test, but if he doesn't do that I'll test it later :)
Make yourself at home, go on ; )
Ok, so let's go test this PR, what I plan to do:
Clone the repository:
$ git clone git@github.com:datasciencebr/jarbas.git
Open the repo folder:
$ cd jarbas
Checkout to @caduvieira branch:
$ git checkout -b caduvieira-master master
Update the branch:
$ git pull https://github.com/caduvieira/jarbas.git master
Copy the .env
file:
$ cp contrib/.env.sample env
Build and start services:
$ docker build -t datasciencebr/jarbas-backend .
$ docker run --rm django test
$ docker run --rm django check
$ docker inspect -f '{{ range .State.Health.Log }}{{ println "======\nStart:" .Start }}{{ .Output }}{{end}}' jarbas_django_1
Result:
➜ jarbas git:(caduvieira-master) ✗ docker inspect -f '{{ range .State.Health.Log }}{{ println "======\nStart:" .Start }}{{ .Output }}{{end}}' jarbas_django_1
======
Start: 2017-11-13 19:15:54.1284389 +0000 UTC
..
Start: 2017-11-13 19:16:54.2898246 +0000 UTC ..
Start: 2017-11-13 19:17:54.3989147 +0000 UTC ..
Start: 2017-11-13 19:18:54.8013659 +0000 UTC ..
Total Duration: 0.094s Count: 2, Failed: 0, Skipped: 0
Seems to be working!
I did something wrong @caduvieira ?
This command was basically to use the Dockerfile
docker-compose.yml
instead of the image from Docker Hub. You can comment image: datasciencebr
out of the Dockerfile
docker-compose.yml
replacing it by build: .
manually.
Use the command
sed -i "s\image: datasciencebr/jarbas-backend\build: .\g" docker-compose.yml
to change the build to manual.
You could also run: docker build -t datasciencebr/jarbas-backend . If you dont want to use the sed command.
The inspect command expects the name of the container. You should change it accordingly
Hi @caduvieira, I was having problems to run the sed
command:
➜ jarbas git:(caduvieira-master) ✗ sed -i "s\image: datasciencebr/jarbas-backend\build: .\g" docker-compose.yml
sed: 1: "docker-compose.yml": extra characters at the end of d command
Am I doing something wrong?
Maybe something in different versions
Try using this other command and don't use the sed
docker build -t datasciencebr/jarbas-backend .
Finally got it!
Here it is, works fine, thanks @caduvieira! I'll wait for @cuducos give an 👍 and then I'll merge!
Changes to jarbas-backend
How to test:
Change docker-compose.yml django from image to build: .
@anaschwendler please could review?