k0rventen / apple-health-grafana

Visualise your Apple Health export in Grafana
390 stars 28 forks source link

[Bug]: docker compose up ingester COPY error #21

Closed jars99 closed 11 months ago

jars99 commented 12 months ago

What happened?

When I tried to run this, I got this error: ERROR: Service 'ingester' failed to build: When using COPY with more than one source file, the destination must be a directory and end with a /

I just added a "/" to the "." that was there in ingester/Dockerfile, and then it worked. So the new destination is: "./"

Environment

Ubuntu 20.04.6, Docker version 24.0.5, build 24.0.5-0ubuntu1~20.04.1

Relevant log output

ERROR: Service 'ingester' failed to build: When using COPY with more than one source file, the destination must be a directory and end with a /

docker-compose.yml

version: "3"
services:
  grafana:
    image: grafana/grafana:10.0.3
    ports:
    - 3001:3001
    environment:
      - GF_SECURITY_ADMIN_USER=admin
      - GF_SECURITY_ADMIN_PASSWORD=health
      - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/dashs/specific-metrics.json
    volumes:
    - ./provisioning:/etc/grafana/provisioning
  influx:
    image: influxdb:1.8
    restart: always
    environment:
      - INFLUXDB_DB=health
    volumes:
    - influx-data:/var/lib/influxdb
  ingester:
    image: k0rventen/apple-health-grafana-ingester
    build: ./ingester
    volumes:
        - ./export.zip:/export.zip

volumes:
  influx-data:
k0rventen commented 12 months ago

Hi ! Thx for reporting this bug ! 👍

I guess this is due to a newer version of docker which doesn't allow this behaviour with the COPY command, because the CI successfully built the container image for the last commit (ci run). Unfortunately the CI logs aren't available anymore, so I can't check which version was used..

What's weird is that your docker daemon built the ingested image locally, instead of pulling the one available on the docker hub. Do you recall which commands you used to download/start the project ? (did you use the --build argument ?)

In the meantime I'll try with a newer version of docker on my side to confirm your behaviour, and update the Dockerfile accordingly.

Regards !

k0rventen commented 11 months ago

same root issue as #22, fixed by b74323e.