Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 添加 windows 镜像 #455

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions compose/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
windows:
image: dockurr/windows
container_name: windows
environment:
TZ: ${TZ:-Asia/Shanghai}
VERSION: ${WINDOWS_VERSION:-2022}
DISK_SIZE: ${WINDOWS_DISK_SIZE:-64G}
LANGUAGE: ${WINDOWS_LANGUAGE:-Chinese}
USERNAME: ${WINDOWS_USERNAME:-administrator}
PASSWORD: $BOOTSTRAP_TOKEN
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
# - 5985:5985
# - 5986:5986
# volumes:
# - ${VOLUME_DIR}/windows/data/windows.iso:/custom.iso
stop_grace_period: 2m
networks:
- net
18 changes: 3 additions & 15 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ function get_docker_compose_services() {
redis_host=$(get_config REDIS_HOST)
use_es=$(get_config USE_ES)
use_minio=$(get_config USE_MINIO)
use_windows=$(get_config USE_WINDOWS)
use_loki=$(get_config USE_LOKI)

use_xpack=$(get_config_or_env USE_XPACK)
Expand Down Expand Up @@ -309,6 +310,7 @@ function get_docker_compose_services() {

[[ "${use_es}" == "1" ]] && services+=" es"
[[ "${use_minio}" == "1" ]] && services+=" minio"
[[ "${use_windows}" == "1" ]] && services+=" windows"
[[ "${use_loki}" == "1" ]] && services+=" loki"

if [[ "${use_xpack}" == "1" ]]; then
Expand All @@ -327,7 +329,6 @@ function get_docker_compose_cmd_line() {
use_ipv6=$(get_config USE_IPV6)
use_xpack=$(get_config_or_env USE_XPACK)
https_port=$(get_config HTTPS_PORT)
db_images_file=$(get_db_images_file)
cmd="docker compose"
if [[ "${use_ipv6}" != "1" ]]; then
cmd+=" -f compose/network.yml"
Expand All @@ -343,27 +344,14 @@ function get_docker_compose_cmd_line() {
done

if [[ "${services}" =~ "mysql" || "${services}" =~ "postgresql" ]]; then
db_images_file=$(get_db_images_file)
cmd+=" -f ${db_images_file}"
fi

use_es=$(get_config USE_ES)
if [[ "${use_es}" == "1" ]]; then
cmd+=" -f compose/es.yml"
fi

use_minio=$(get_config USE_MINIO)
if [[ "${use_minio}" == "1" ]]; then
cmd+=" -f compose/minio.yml"
fi

if [[ -n "${https_port}" ]]; then
cmd+=" -f compose/lb.yml"
fi

if [[ "${services}" =~ loki ]]; then
cmd+=" -f compose/loki.yml"
fi

if [[ "${use_xpack}" == '1' ]]; then
for service in magnus razor xrdp video panda; do
if [[ "${services}" =~ ${service} ]]; then
Expand Down