Skip to content

Commit

Permalink
feat: 添加 windows 镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Jun 25, 2024
1 parent 7c643a2 commit e8c2aa4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
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

0 comments on commit e8c2aa4

Please sign in to comment.