16.6k stars 开源的本地文件共享传输工具 docker部署教程

Install

First, Install docker with docker-compose.

Then, clone the repository:

复制代码
    git clone https://github.com/RobinLinus/snapdrop.git
    cd snapdrop
    docker-compose up -d

Now point your browser to http://localhost:8080.

  • To restart the containers run docker-compose restart.
  • To stop the containers run docker-compose stop.
  • To debug the NodeJS server run docker logs snapdrop_node_1.

Run locally by pulling image from Docker Hub

Have docker installed, then use the command:

复制代码
    docker pull linuxserver/snapdrop

To run the image, type (if port 8080 is occupied by host use another random port :80):

复制代码
    docker run -d -p 8080:80 linuxserver/snapdrop

PWAs require that the app is served under a correctly set up and trusted TLS endpoint.

The nginx container creates a CA certificate and a website certificate for you. To correctly set the common name of the certificate, you need to change the FQDN environment variable in docker/fqdn.env to the fully qualified domain name of your workstation.

If you want to test PWA features, you need to trust the CA of the certificate for your local deployment. For your convenience, you can download the crt file from http://<Your FQDN>:8080/ca.crt. Install that certificate to the trust store of your operating system.

  • On Windows, make sure to install it to the Trusted Root Certification Authorities store.
  • On MacOS, double click the installed CA certificate in Keychain Access, expand Trust, and select Always Trust for SSL.
  • Firefox uses its own trust store. To install the CA, point Firefox at http://<Your FQDN>:8080/ca.crt. When prompted, select Trust this CA to identify websites and click OK.
  • When using Chrome, you need to restart Chrome so it reloads the trust store (chrome://restart). Additionally, after installing a new cert, you need to clear the Storage (DevTools -> Application -> Clear storage -> Clear site data).

Please note that the certificates (CA and webserver cert) expire after a day. Also, whenever you restart the nginx docker, container new certificates are created.

The site is served on https://<Your FQDN>:443.

Deployment Notes

The client expects the server at http(s)://your.domain/server.

When serving the node server behind a proxy, the X-Forwarded-For header has to be set by the proxy. Otherwise, all clients that are served by the proxy will be mutually visible.

By default, the server listens on port 3000.

For an nginx configuration example, see docker/nginx/default.conf.

参考地址:docs/local-dev.md · AscendKing/snapdrop - Gitee.com

相关推荐
冬奇Lab10 小时前
开源项目第175期:Buzz — Jack Dorsey 的 Block 用 Nostr 重新定义团队协作,AI Agent 拥有自己的加密身份
人工智能·开源·资讯
隔窗听雨眠15 小时前
生产级Kubernetes集群部署完全指南:从kubeadm到高可用架构落地
容器·架构·kubernetes
m4Rk_16 小时前
【论文阅读】Agent 记忆机制(28):MEM1——将记忆压缩融入推理,实现近似恒定上下文的长程智能体
论文阅读·人工智能·学习·开源·github
小小洋洋16 小时前
OpenWrt 从U盘迁移到内置 eMMC,并完成扩容与 Docker 安装
java·docker·eureka
Eloudy16 小时前
docker build 与 docker buildx build 的应用场景
docker·构建
瞬间&永恒~16 小时前
【Docker】(三)联合文件系统UnionFS + Overlay2
docker·云原生·容器
数据知道19 小时前
主机入侵检测(HIDS):OSSEC / Wazuh 部署与规则编写
安全·网络安全·docker
在水一缸19 小时前
从“反向技能“到协作革命:当开源重新定义AI编程助手
开源·github·ai编程·开发者工具·ai编程助手·ai协作·claude cowork
逐光老顽童20 小时前
第 5 章:搞懂 K8s Service:从 ClusterIP 到负载均衡
docker·云原生·容器
数智工坊20 小时前
Conda 环境 Docker 标准化迁移完整方案,适配深度学习 GPU 训练
深度学习·docker·conda