Update Dockerfile
Browse files- Dockerfile +14 -11
Dockerfile
CHANGED
|
@@ -11,18 +11,21 @@ RUN curl -Lo /usr/local/bin/hysteria https://github.com/HyNetwork/hysteria/relea
|
|
| 11 |
# Create a directory for Hysteria configuration
|
| 12 |
RUN mkdir -p /etc/hysteria
|
| 13 |
|
| 14 |
-
# Create the Hysteria configuration file directly in the Dockerfile
|
| 15 |
-
RUN
|
| 16 |
-
|
| 17 |
-
"
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
}
|
| 22 |
-
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
# Expose the required
|
| 25 |
-
EXPOSE
|
|
|
|
| 26 |
|
| 27 |
# Start Hysteria
|
| 28 |
CMD ["/usr/local/bin/hysteria", "-c", "/etc/hysteria/config.json", "server"]
|
|
|
|
| 11 |
# Create a directory for Hysteria configuration
|
| 12 |
RUN mkdir -p /etc/hysteria
|
| 13 |
|
| 14 |
+
# Create the Hysteria configuration file directly in the Dockerfile
|
| 15 |
+
RUN echo '{' > /etc/hysteria/config.json && \
|
| 16 |
+
echo ' "listen": ":7860",' >> /etc/hysteria/config.json && \
|
| 17 |
+
echo ' "acme": {' >> /etc/hysteria/config.json && \
|
| 18 |
+
echo ' "domains": ["fake-domain.com"],' >> /etc/hysteria/config.json && \
|
| 19 |
+
echo ' "email": "fake-email@example.com",' >> /etc/hysteria/config.json && \
|
| 20 |
+
echo ' "disable_tls_verification": true' >> /etc/hysteria/config.json && \
|
| 21 |
+
echo ' },' >> /etc/hysteria/config.json && \
|
| 22 |
+
echo ' "up_mbps": 100,' >> /etc/hysteria/config.json && \
|
| 23 |
+
echo ' "down_mbps": 100' >> /etc/hysteria/config.json && \
|
| 24 |
+
echo '}' >> /etc/hysteria/config.json
|
| 25 |
|
| 26 |
+
# Expose the required ports for ACME (HTTP and HTTPS)
|
| 27 |
+
EXPOSE 80
|
| 28 |
+
EXPOSE 443
|
| 29 |
|
| 30 |
# Start Hysteria
|
| 31 |
CMD ["/usr/local/bin/hysteria", "-c", "/etc/hysteria/config.json", "server"]
|