Update Dockerfile
Browse files- Dockerfile +10 -13
Dockerfile
CHANGED
|
@@ -1,20 +1,17 @@
|
|
| 1 |
# Start from the official NyaProxy image
|
| 2 |
FROM k3scat/nya-proxy:latest
|
| 3 |
|
| 4 |
-
# Switch to the root user to create
|
| 5 |
USER root
|
| 6 |
|
| 7 |
-
# Create a
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
# will have the necessary permissions.
|
| 11 |
-
RUN mkdir /data && chmod 777 /data
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
ENV NYA_PROXY_CONFIG_PATH=/data/config.yaml
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
#
|
| 19 |
-
#
|
| 20 |
-
|
|
|
|
| 1 |
# Start from the official NyaProxy image
|
| 2 |
FROM k3scat/nya-proxy:latest
|
| 3 |
|
| 4 |
+
# Switch to the root user to create our writable directory
|
| 5 |
USER root
|
| 6 |
|
| 7 |
+
# Create a /data directory and give ownership to the 'nya' user,
|
| 8 |
+
# which we know exists inside the base image.
|
| 9 |
+
RUN mkdir /data && chown nya:nya /data
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
# Switch back to the non-root 'nya' user for security
|
| 12 |
+
USER nya
|
|
|
|
| 13 |
|
| 14 |
+
# IMPORTANT: Override the default command to point to the new config path.
|
| 15 |
+
# The original command was ["--config", "config.yaml"].
|
| 16 |
+
# We are changing it to use an absolute path to our writable directory.
|
| 17 |
+
CMD ["--config", "/data/config.yaml"]
|