mirror of
https://github.com/dockur/windows.git
synced 2024-12-27 22:35:49 +00:00
docs: Add TUN device (#940)
Some checks failed
Update / dockerHubDescription (push) Has been cancelled
Some checks failed
Update / dockerHubDescription (push) Has been cancelled
This commit is contained in:
parent
a4fdfbdf91
commit
9654a945fb
@ -6,6 +6,7 @@ services:
|
|||||||
VERSION: "11"
|
VERSION: "11"
|
||||||
devices:
|
devices:
|
||||||
- /dev/kvm
|
- /dev/kvm
|
||||||
|
- /dev/net/tun
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
ports:
|
ports:
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
@ -16,19 +17,9 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
name: windows
|
name: windows
|
||||||
spec:
|
spec:
|
||||||
terminationGracePeriodSeconds: 120 # the Kubernetes default is 30 seconds and it may be not enough
|
|
||||||
containers:
|
containers:
|
||||||
- name: windows
|
- name: windows
|
||||||
image: dockurr/windows
|
image: dockurr/windows
|
||||||
ports:
|
|
||||||
- containerPort: 8006
|
|
||||||
protocol: TCP
|
|
||||||
- containerPort: 3389
|
|
||||||
protocol: TCP
|
|
||||||
- containerPort: 3389
|
|
||||||
protocol: UDP
|
|
||||||
securityContext:
|
|
||||||
privileged: true
|
|
||||||
env:
|
env:
|
||||||
- name: VERSION
|
- name: VERSION
|
||||||
value: "11"
|
value: "11"
|
||||||
@ -38,37 +29,49 @@ spec:
|
|||||||
value: "2"
|
value: "2"
|
||||||
- name: DISK_SIZE
|
- name: DISK_SIZE
|
||||||
value: "64G"
|
value: "64G"
|
||||||
|
ports:
|
||||||
|
- containerPort: 8006
|
||||||
|
- containerPort: 3389
|
||||||
|
- containerPort: 3389
|
||||||
|
protocol: UDP
|
||||||
|
securityContext:
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- NET_ADMIN
|
||||||
|
privileged: true
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /storage
|
- mountPath: /storage
|
||||||
name: storage
|
name: storage
|
||||||
- mountPath: /dev/kvm
|
- mountPath: /dev/kvm
|
||||||
name: dev-kvm
|
name: dev-kvm
|
||||||
|
- mountPath: /dev/net/tun
|
||||||
|
name: dev-tun
|
||||||
|
terminationGracePeriodSeconds: 120
|
||||||
volumes:
|
volumes:
|
||||||
- name: storage
|
- name: storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: windows-pvc
|
claimName: windows-pvc
|
||||||
- name: dev-kvm
|
- hostPath:
|
||||||
hostPath:
|
|
||||||
path: /dev/kvm
|
path: /dev/kvm
|
||||||
|
name: dev-kvm
|
||||||
|
- hostPath:
|
||||||
|
path: /dev/net/tun
|
||||||
|
type: CharDevice
|
||||||
|
name: dev-tun
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: windows
|
name: windows
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
|
||||||
selector:
|
|
||||||
name: windows
|
|
||||||
ports:
|
ports:
|
||||||
- name: tcp-8006
|
- name: tcp-8006
|
||||||
protocol: TCP
|
|
||||||
port: 8006
|
port: 8006
|
||||||
targetPort: 8006
|
|
||||||
- name: tcp-3389
|
- name: tcp-3389
|
||||||
protocol: TCP
|
|
||||||
port: 3389
|
port: 3389
|
||||||
targetPort: 3389
|
|
||||||
- name: udp-3389
|
- name: udp-3389
|
||||||
protocol: UDP
|
|
||||||
port: 3389
|
port: 3389
|
||||||
targetPort: 3389
|
protocol: UDP
|
||||||
|
selector:
|
||||||
|
name: windows
|
||||||
|
type: NodePort
|
||||||
|
@ -37,6 +37,7 @@ services:
|
|||||||
VERSION: "11"
|
VERSION: "11"
|
||||||
devices:
|
devices:
|
||||||
- /dev/kvm
|
- /dev/kvm
|
||||||
|
- /dev/net/tun
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
ports:
|
ports:
|
||||||
@ -49,7 +50,7 @@ services:
|
|||||||
Via Docker CLI:
|
Via Docker CLI:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
|
docker run -it --rm -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
|
||||||
```
|
```
|
||||||
|
|
||||||
Via Kubernetes:
|
Via Kubernetes:
|
||||||
|
Loading…
Reference in New Issue
Block a user