Skip to content

Commit 2bbeecd

Browse files
committed
v2.0
1 parent b5e2a95 commit 2bbeecd

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM alpine:latest
2+
3+
LABEL org.opencontainers.image.title="firefly" \
4+
org.opencontainers.image.version="v2.0" \
5+
org.opencontainers.image.description="Firefly WireGuard server" \
6+
org.opencontainers.image.licenses="MIT" \
7+
org.opencontainers.image.source="https://github.com/Safe3/firefly"
8+
9+
COPY firefly-linux-amd64 /firefly/firefly
10+
11+
# Install Linux packages
12+
RUN apk add --no-cache --purge --clean-protected dumb-init iptables tzdata && rm -rf /var/cache/apk/*
13+
14+
EXPOSE 50120/udp
15+
EXPOSE 50121/tcp
16+
17+
WORKDIR /firefly
18+
CMD ["/usr/bin/dumb-init", "./firefly"]

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868

6969
后台运行:nohup ./firefly-linux-amd64 >/dev/null 2>&1 &
7070

71+
容器中运行:下载docker-compose.yml文件然后执行docker compose up -d
72+
7173
访问 http://ip:50121 登录管理后台,默认密码firefly
7274

7375

docker-compose.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: '3'
2+
services:
3+
firefly:
4+
image: "uusec/firefly:latest"
5+
container_name: firefly-server
6+
devices:
7+
- /dev/net/tun
8+
network_mode: host
9+
volumes:
10+
- /lib/modules:/lib/modules
11+
- /etc/firefly:/firefly/conf
12+
cap_add:
13+
- NET_ADMIN
14+
- SYS_MODULE
15+
restart: unless-stopped
16+
environment:
17+
#- TZ=Asia/Shanghai
18+
#- FIREFLY_DEVICE=eth0
19+
- FIREFLY_PASSWORD=firefly
20+
#- FIREFLY_AUTO_SSL=false
21+
#- FIREFLY_PORT=50121
22+

0 commit comments

Comments
 (0)