| # Start from the official NyaProxy image | |
| FROM k3scat/nya-proxy:latest | |
| # Switch to the root user to create our writable directory | |
| USER root | |
| # Create a /data directory and give ownership to the 'nya' user, | |
| # which we know exists inside the base image. | |
| RUN mkdir /data && chown nya:nya /data | |
| # Switch back to the non-root 'nya' user for security | |
| USER nya | |
| # IMPORTANT: Override the default command to point to the new config path. | |
| # The original command was ["--config", "config.yaml"]. | |
| # We are changing it to use an absolute path to our writable directory. | |
| CMD ["--config", "/data/config.yaml"] |