mirror of
https://github.com/dockur/windows.git
synced 2026-01-22 02:43:06 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f0cdc9bd1 | ||
|
|
9654a945fb | ||
|
|
a4fdfbdf91 |
@@ -1,7 +1,7 @@
|
|||||||
ARG VERSION_ARG="latest"
|
ARG VERSION_ARG="latest"
|
||||||
FROM scratch AS build-amd64
|
FROM scratch AS build-amd64
|
||||||
|
|
||||||
COPY --from=qemux/qemu-docker:6.09 / /
|
COPY --from=qemux/qemu-docker:6.11 / /
|
||||||
|
|
||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
@@ -29,7 +29,6 @@ RUN set -eu && \
|
|||||||
COPY --chmod=755 ./src /run/
|
COPY --chmod=755 ./src /run/
|
||||||
COPY --chmod=755 ./assets /run/assets
|
COPY --chmod=755 ./assets /run/assets
|
||||||
|
|
||||||
ADD --chmod=755 https://raw.githubusercontent.com/christgau/wsdd/v0.8/src/wsdd.py /usr/sbin/wsdd
|
|
||||||
ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.43-0/virtio-win-1.9.43.tar.xz /drivers.txz
|
ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.43-0/virtio-win-1.9.43.tar.xz /drivers.txz
|
||||||
|
|
||||||
FROM dockurr/windows-arm:${VERSION_ARG} AS build-arm64
|
FROM dockurr/windows-arm:${VERSION_ARG} AS build-arm64
|
||||||
|
|||||||
@@ -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,10 +1,11 @@
|
|||||||
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: windows-pvc
|
name: windows-pvc
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 64Gi
|
storage: 64Gi
|
||||||
@@ -16,59 +17,61 @@ 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:
|
env:
|
||||||
- containerPort: 8006
|
- name: VERSION
|
||||||
protocol: TCP
|
value: "11"
|
||||||
- containerPort: 3389
|
- name: RAM_SIZE
|
||||||
protocol: TCP
|
value: "4G"
|
||||||
- containerPort: 3389
|
- name: CPU_CORES
|
||||||
protocol: UDP
|
value: "2"
|
||||||
securityContext:
|
- name: DISK_SIZE
|
||||||
privileged: true
|
value: "64G"
|
||||||
env:
|
ports:
|
||||||
- name: VERSION
|
- containerPort: 8006
|
||||||
value: "11"
|
- containerPort: 3389
|
||||||
- name: RAM_SIZE
|
- containerPort: 3389
|
||||||
value: "4G"
|
protocol: UDP
|
||||||
- name: CPU_CORES
|
securityContext:
|
||||||
value: "2"
|
capabilities:
|
||||||
- name: DISK_SIZE
|
add:
|
||||||
value: "64G"
|
- NET_ADMIN
|
||||||
volumeMounts:
|
privileged: true
|
||||||
- mountPath: /storage
|
volumeMounts:
|
||||||
name: storage
|
- mountPath: /storage
|
||||||
- mountPath: /dev/kvm
|
name: storage
|
||||||
name: dev-kvm
|
- mountPath: /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
|
ports:
|
||||||
|
- name: tcp-8006
|
||||||
|
port: 8006
|
||||||
|
- name: tcp-3389
|
||||||
|
port: 3389
|
||||||
|
- name: udp-3389
|
||||||
|
port: 3389
|
||||||
|
protocol: UDP
|
||||||
selector:
|
selector:
|
||||||
name: windows
|
name: windows
|
||||||
ports:
|
type: NodePort
|
||||||
- name: tcp-8006
|
|
||||||
protocol: TCP
|
|
||||||
port: 8006
|
|
||||||
targetPort: 8006
|
|
||||||
- name: tcp-3389
|
|
||||||
protocol: TCP
|
|
||||||
port: 3389
|
|
||||||
targetPort: 3389
|
|
||||||
- name: udp-3389
|
|
||||||
protocol: UDP
|
|
||||||
port: 3389
|
|
||||||
targetPort: 3389
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user