Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] container won't start #41

Open
jpriebe opened this issue Aug 31, 2024 · 2 comments
Open

[Bug] container won't start #41

jpriebe opened this issue Aug 31, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jpriebe
Copy link

jpriebe commented Aug 31, 2024

Container won't start - watching the events, I can see the container dies right away, and the only thing it has in the logs is this:

chown: changing ownership of '/app/configuration.local.json': Read-only file system

My docker-compose is essentially the same as the example in the documentation.

  ambient-weather:
    container_name: ambient-weather-server
    image: philosowaffle/ambientweather-local-server:latest
    ports:
      - 8001:8080
    environment:
      - TZ=America/Chicago
    volumes:
      - /appdata/ambient-weather/configuration.local.json:/app/configuration.local.json:ro
      - /appdata/ambient-weather/output:/app/output # optional, logs may be written here based on your configuration

I don't understand why the code is calling chown on /app when the volume mapping specifically puts a read-only file into the /app directory.

But I'm pretty sure that chown is failing, causing the entrypoint script to bail out and the container won't start.

Using Fedora Server 40.

@jpriebe jpriebe added the bug Something isn't working label Aug 31, 2024
@jpriebe
Copy link
Author

jpriebe commented Aug 31, 2024

The more I look around, the more confused I am. The Dockerfile puts configuration.local.json into /app/api, but the docker-compose.yaml has it mounted as a volume under /app.

And it may not have anything to do with this configuration file being read-only. I wonder, is the issue just that the container's entire filesystem is read-only?

I don't get the chown and chmod calls -- generally, you don't want to modify files that are part of the container image, do you?

@jpriebe
Copy link
Author

jpriebe commented Aug 31, 2024

Well, I removed the ":ro" from the json volume, and it looks like it started up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant