Skip to content

Permissions /cache #45

@martijndierckx

Description

@martijndierckx

Hi

I don't want to precreate the cache folder with the right permissions.
And the dockerfile doesn't do it either at the moment, so I worked around this using the following compose file:

services:
  esphome:
    container_name: esphome
    build:
      context: .
      dockerfile_inline: |
        FROM ptr727/esphome-nonroot
        RUN mkdir /cache
        RUN chown -R 1500:1500 /cache /config
        USER 1500:1500
        CMD ["entrypoint"]
    environment:
      - ESPHOME_DASHBOARD_USE_PING=TRUE
      - TZ=Europe/Brussels
    volumes:
      - /opt/esphome/:/config
      - cache:/cache
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 6052:6052
    restart: unless-stopped

volumes:
  cache:
    driver: local

Would be great if you could adapt the dockerfile to chown/chmod the cache dir there, so I don't have to

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions