Improve Dockerfile.
This commit is contained in:
parent
e4d34fbabb
commit
d7a3910779
4 changed files with 15 additions and 6 deletions
|
@ -1,5 +0,0 @@
|
|||
FROM alpine
|
||||
|
||||
RUN apk add --no-cache wireguard-tools-wg-quick
|
||||
|
||||
|
|
@ -5,11 +5,15 @@ services:
|
|||
{% for item in keypairs %}
|
||||
{{ item.item }}:
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
context: ./server/
|
||||
volumes:
|
||||
- ./config/{{ item.item }}-wg0.conf:/etc/wireguard/wg0.conf
|
||||
networks:
|
||||
- default
|
||||
expose:
|
||||
- 51871
|
||||
command: [ "sleep", "10000" ]
|
||||
cap_add: [ "NET_ADMIN" ]
|
||||
{% endfor %}
|
||||
networks:
|
||||
default:
|
||||
|
|
5
dev/server/Dockerfile
Normal file
5
dev/server/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM alpine
|
||||
|
||||
RUN apk add --no-cache wireguard-tools-wg-quick
|
||||
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
5
dev/server/entrypoint.sh
Executable file
5
dev/server/entrypoint.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
wg-quick up wg0
|
||||
|
||||
"$@"
|
Loading…
Reference in a new issue