okfn-brasil / jarbas

🎩 API for information and suspicions about reimbursements by Brazilian congresspeople
https://jarbas.serenata.ai/
296 stars 61 forks source link

Use slim to reduce Elm container #309

Closed cuducos closed 6 years ago

cuducos commented 6 years ago

What is the purpose of this Pull Request?

The Docker image to render Elm was too big (723MB):

$ docker images | grep jarbas
datasciencebr/jarbas-frontend   latest              26f5ad1240ee        12 days ago         723MB
datasciencebr/jarbas-backend    latest              dde71b4b84b6        12 days ago         181MB

What was done to achieve this purpose?

I suggest we use the slim version of the node Docker image instead (I tried alpine but ended up with some npm errors). This reduced the image size in 61%:

jarbas_elm_alpine               latest              06f7c4734ab6        2 minutes ago       279MB

How to test if it really works?

Edit docker-compose.yml to use Dockerfile-elm file instead of pulling datasciencebr/jarbas-frontend. Build containers, run Jarbas and check if Layers (localhost:8000/layers/) doesn't crash.

Who can help reviewing it?

@anaschwendler

anaschwendler commented 6 years ago

Ok, let's test this PR:

  1. Clone the project:

    $ git clone git@github.com:datasciencebr/jarbas.git
  2. Change to Jarbas folder:

    $ cd jarbas
  3. Change to @cuducos branch:

    $ git fetch origin
    $ git checkout -b cuducos-slim-docker-elm origin/cuducos-slim-docker-elm
    $ git merge master
  4. Edit docker-compose.yml to use Dockerfile-elm file instead of pulling datasciencebr/jarbas-frontend.

  5. Build containers, run Jarbas and check if Layers (localhost:8000/layers/) doesn't crash:

    $ cp contrib/.env.sample .env
    $ docker-compose up -d
    $ docker-compose run --rm django python manage.py migrate
    $ docker-compose run --rm django python manage.py reimbursements /mnt/data/reimbursements_sample.xz
    $ docker-compose run --rm django python manage.py companies /mnt/data/companies_sample.xz
    $ docker-compose run --rm django python manage.py suspicions /mnt/data/suspicions_sample.xz
    $ docker-compose run --rm django python manage.py tweets
    $ docker-compose run --rm django python manage.py searchvector

I guess I did something wrong, since I didn't get it: image

How do I:

Edit docker-compose.yml to use Dockerfile-elm file instead of pulling datasciencebr/jarbas-frontend.

?

I guess I did something wrong here

While running, I got this error:

``` ➜ jarbas git:(cuducos-slim-docker-elm) ✗ docker-compose run --rm django python manage.py tweets Starting jarbas_postgres_1 ... Starting jarbas_queue_1 ... done Starting jarbas_elm_1 ... done Starting jarbas_tasks_1 ... done Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_line(sys.argv) File "/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 356, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.5/site-packages/django/core/management/base.py", line 283, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.5/site-packages/django/core/management/base.py", line 330, in execute output = self.handle(*args, **options) File "/code/jarbas/chamber_of_deputies/management/commands/tweets.py", line 30, in handle for status, document_id in self.document_ids: File "/code/jarbas/chamber_of_deputies/management/commands/tweets.py", line 102, in document_ids for tweet_id, url in self.urls: File "/code/jarbas/chamber_of_deputies/management/commands/tweets.py", line 79, in urls for tweet in self.tweets: File "/code/jarbas/chamber_of_deputies/management/commands/tweets.py", line 69, in tweets yield from api.GetUserTimeline(**kwargs) File "/usr/local/lib/python3.5/site-packages/twitter/api.py", line 798, in GetUserTimeline resp = self._RequestUrl(url, 'GET', data=parameters) File "/usr/local/lib/python3.5/site-packages/twitter/api.py", line 4948, in _RequestUrl limit = self.CheckRateLimit(url) File "/usr/local/lib/python3.5/site-packages/twitter/api.py", line 4801, in CheckRateLimit self.InitializeRateLimit() File "/usr/local/lib/python3.5/site-packages/twitter/api.py", line 4784, in InitializeRateLimit data = self._ParseAndCheckTwitter(resp.content.decode('utf-8')) File "/usr/local/lib/python3.5/site-packages/twitter/api.py", line 4894, in _ParseAndCheckTwitter self._CheckForTwitterError(data) File "/usr/local/lib/python3.5/site-packages/twitter/api.py", line 4914, in _CheckForTwitterError raise TwitterError(data['errors']) twitter.error.TwitterError: [{'code': 89, 'message': 'Invalid or expired token.'}] ```
cuducos commented 6 years ago

How do I:

Edit docker-compose.yml to use Dockerfile-elm file instead of pulling datasciencebr/jarbas-frontend.

Like that:

Comment out the image from docker-compose to build django and tasks containers locally:

   # image: datasciencebr/jarbas-backend
   build:
     context: . 

This time commenting out jarbas-frontend not jarbas-backend.

The error you shared seems totally unrelated to the Elm container (twitter.error.TwitterError). Do you have the logs from the Elm container (the output of $ docker-compose logs elm)?

anaschwendler commented 6 years ago

I'll attach the result of Elm log, and the migrations:

``` ➜ jarbas git:(cuducos-slim-docker-elm) ✗ docker-compose logs elm Attaching to jarbas_elm_1 elm_1 | Performing system checks... elm_1 | elm_1 | System check identified no issues (0 silenced). elm_1 | elm_1 | You have 55 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, chamber_of_deputies, contenttypes, core, sessions. elm_1 | Run 'python manage.py migrate' to apply them. elm_1 | January 05, 2018 - 17:45:49 elm_1 | Django version 1.11.7, using settings 'jarbas.settings' elm_1 | Starting development server at http://0.0.0.0:8000/ elm_1 | Quit the server with CONTROL-C. elm_1 | [05/Jan/2018 17:46:43] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:46:43] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:47:43] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:47:43] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:48:43] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:48:43] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:49:43] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:49:43] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:50:43] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:50:44] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:51:44] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:51:44] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:52:44] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:52:44] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:53:44] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:53:44] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:54:44] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:54:44] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:55:44] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:55:44] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:56:44] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:56:44] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:57:45] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:57:45] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:58:45] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:58:45] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 17:59:45] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 17:59:45] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:00:45] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:00:45] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:01:45] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:01:45] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:02:45] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:02:45] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:03:46] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:03:46] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:04:46] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:04:46] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:05:46] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:05:46] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:06:46] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:06:46] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:07:46] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:07:46] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:08:46] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:08:46] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:09:46] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:09:46] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:10:47] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:10:47] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:11:47] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:11:47] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:12:47] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:12:47] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:13:47] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:13:47] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:14:47] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:14:47] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:15:48] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:15:48] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:16:48] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:16:48] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:17:48] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:17:48] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:18:48] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:18:48] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:19:48] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:19:48] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:20:48] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:20:49] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:21:49] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:21:49] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:22:49] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:22:49] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:23:49] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:23:49] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:24:49] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:24:49] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:25:49] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:25:49] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:26:49] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:26:49] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:27:50] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:27:50] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:28:50] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:28:50] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:29:50] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:29:50] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:30:50] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:30:50] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:31:50] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:31:50] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:32:50] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:32:50] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:33:50] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:33:50] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:34:50] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:34:50] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:35:51] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:35:51] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:36:51] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:36:51] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:37:51] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:37:51] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:38:51] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:38:51] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:39:51] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:39:51] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:40:51] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:40:51] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:41:52] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:41:52] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:42:52] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:42:52] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 18:43:52] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 18:43:52] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 19:40:30] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 19:40:30] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 elm_1 | [05/Jan/2018 19:41:30] "GET / HTTP/1.1" 302 0 elm_1 | [05/Jan/2018 19:41:30] "GET /dashboard/chamber_of_deputies/reimbursement/ HTTP/1.1" 500 27 ➜ jarbas git:(cuducos-slim-docker-elm) ✗ docker-compose run --rm django python manage.py migrate Starting jarbas_postgres_1 ... done Starting jarbas_queue_1 ... done Starting jarbas_elm_1 ... done Starting jarbas_tasks_1 ... done Operations to perform: Apply all migrations: admin, auth, chamber_of_deputies, contenttypes, core, sessions Running migrations: No migrations to apply. Your models have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them. ➜ jarbas git:(cuducos-slim-docker-elm) ✗ ````
cuducos commented 6 years ago

I'll attach the result of Elm log

From this output I'm afraid you're running something else in the elm container. The output looks like Django's one. Can you share your docker-compose.yml?

anaschwendler commented 6 years ago

Sure:

docker-compose.yml:

``` version: '3' services: django: image: datasciencebr/jarbas-backend environment: - DATABASE_URL=postgres://jarbas:mysecretpassword@postgres/jarbas - ALLOWED_HOSTS=localhost,127.0.0.1 - AMAZON_S3_BUCKET=serenata-de-amor-data - AMAZON_S3_REGION=s3-sa-east-1 - AMAZON_S3_CEAPTRANSLATION_DATE=2016-08-08 - CELERY_BROKER_URL=amqp://guest:guest@queue/ depends_on: - elm - tasks - postgres volumes: - "./contrib/data:/mnt/data" tasks: image: datasciencebr/jarbas-backend environment: - DATABASE_URL=postgres://jarbas:mysecretpassword@postgres/jarbas - CELERY_BROKER_URL=amqp://guest:guest@queue/ depends_on: - postgres - queue entrypoint: ['/bin/sh', '-c'] command: ['celery worker --app jarbas'] elm: build: . postgres: image: postgres:9.6.5-alpine environment: - POSTGRES_PASSWORD=mysecretpassword - POSTGRES_USER=jarbas - POSTGRES_DB=jarbas volumes: - ./db:/var/lib/postgresql queue: image: rabbitmq:3.6.11-alpine ```
cuducos commented 6 years ago
 elm:
    build: .

Hum…got it! These lines makes elm container user the default Dockerfile (which is a Django container), not Dockerfile-elm.

 elm:
    build:
        context: Dockerfile-elm

That should work.

anaschwendler commented 6 years ago

I've did the changes, still not work:

```console ➜ jarbas git:(cuducos-slim-docker-elm) ✗ docker-compose up -d Pulling queue (rabbitmq:3.6.11-alpine)... 3.6.11-alpine: Pulling from library/rabbitmq 88286f41530e: Pull complete f37b1a2424b3: Pull complete 2799929042f7: Pull complete 1a0ac93c08db: Pull complete 7dc18c248a7b: Pull complete 9085838e09d8: Pull complete 0f793b591a3e: Pull complete 42da39c9c3ca: Pull complete 0a442df56342: Pull complete Digest: sha256:109570cf2ede004fcc5374f8cf35ad26308b393591f5e05736073ed0c264cac2 Status: Downloaded newer image for rabbitmq:3.6.11-alpine Pulling postgres (postgres:9.6.5-alpine)... 9.6.5-alpine: Pulling from library/postgres b1f00a6a160c: Pull complete 25a88a2feda9: Pull complete bcd866a92fb7: Pull complete 8c43cb896f3e: Pull complete 341573b3bddd: Pull complete d7ccfa970786: Pull complete 32d28928466b: Pull complete 8b424957445a: Pull complete 88c1161620fb: Pull complete Digest: sha256:bafac9478d8cca8965d091ee228c6897bfa0e2ad4704c26f58bedc8b37c4cde1 Status: Downloaded newer image for postgres:9.6.5-alpine Pulling tasks (datasciencebr/jarbas-backend:latest)... latest: Pulling from datasciencebr/jarbas-backend ab7e51e37a18: Pull complete 4a57a4e05b89: Pull complete f93d7574e365: Pull complete 9aebeb85271c: Pull complete 37fd737b28d1: Pull complete 1a9f8b12d1c4: Pull complete c85d9f1f16b8: Pull complete 317a17b81fae: Pull complete b83ea92f9392: Pull complete bb383a6c0c0d: Pull complete 56f3c987c0db: Pull complete Digest: sha256:05534287959b90fb7ecf7dfc39d2db216ebecd6f77f97c2deb347a5754655aa7 Status: Downloaded newer image for datasciencebr/jarbas-backend:latest Building elm Traceback (most recent call last): File "docker-compose", line 6, in File "compose/cli/main.py", line 71, in main File "compose/cli/main.py", line 124, in perform_command File "compose/cli/main.py", line 959, in up File "compose/project.py", line 452, in up File "compose/service.py", line 324, in ensure_image_exists File "compose/service.py", line 967, in build File "site-packages/docker/api/build.py", line 142, in build TypeError: You must specify a directory to build in path Failed to execute script docker-compose ```
cuducos commented 6 years ago

My bad. Checking Docker Compose docs, the correct would be:

elm:
    build:
        context: .
        dockerfile: Dockerfile-elm
anaschwendler commented 6 years ago

Ok, let's continue ;)

anaschwendler commented 6 years ago

YAS! It is working now \o\

image

Tried to search something, and works fine \o\