Update Dockerfile
Browse files- Dockerfile +3 -5
Dockerfile
CHANGED
|
@@ -6,9 +6,7 @@ USER root
|
|
| 6 |
|
| 7 |
RUN mkdir -p /opt/openlist/data && chmod 777 /opt/openlist/data
|
| 8 |
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
# 鍚姩鍛戒护
|
| 14 |
-
CMD ./openlist server --data /opt/openlist/data & sleep 20 && ./openlist admin set "$ADMIN_PASSWORD" --data /opt/openlist/data && sleep 5 && TOKEN=$(curl -s http://localhost:5244/api/auth/login -H "Content-Type: application/json" -d "{"username":"admin","password":"$ADMIN_PASSWORD"}" | grep -o '"token":"[^"]*"' | cut -d'"' -f4) && curl -s -X POST http://localhost:5244/api/admin/storage/create -H "Content-Type: application/json" -H "Authorization: $TOKEN" -d '{"mount_path":"/hi168s3","driver":"S3","addition":"{\"bucket\":\"hi168-29132-0136saow\",\"endpoint\":\"https://s3.hi168.com\",\"access_key_id\":\"CYUQCHOIAH41GJHK3Y4H\",\"secret_access_key\":\"Ubd1B6JzXRbipWsHDHcc99OAfJvjOf8CpNkUx9YM\",\"force_path_style\":true,\"sign_url_expire\":4}"}' && wait
|
|
|
|
| 6 |
|
| 7 |
RUN mkdir -p /opt/openlist/data && chmod 777 /opt/openlist/data
|
| 8 |
|
| 9 |
+
COPY start.sh /start.sh
|
| 10 |
+
RUN chmod +x /start.sh
|
| 11 |
|
| 12 |
+
CMD ["/start.sh"]
|
|
|
|
|
|
|
|
|