Skip to content

Commit e7502f3

Browse files
committed
fix: add amd platform to docker run args to force emulation on arm (#168)
1 parent 880277f commit e7502f3

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ docker run -it \
232232
--rm \
233233
--hostname="$(hostname)" \
234234
--env="DISPLAY" \
235+
--platform="linux/amd64" \
235236
--volume="${XAUTHORITY:-${HOME}/.Xauthority}:/root/.Xauthority:ro" \
236237
--volume="/tmp/.X11-unix:/tmp/.X11-unix:ro" \
237238
scottyhardy/docker-wine /bin/bash
@@ -244,6 +245,7 @@ docker run -it \
244245
--rm \
245246
--hostname="$(hostname)" \
246247
--env="RDP_SERVER=yes" \
248+
--platform="linux/amd64" \
247249
--publish="3389:3389/tcp" \
248250
scottyhardy/docker-wine /bin/bash
249251
```

docker-wine

+1-6
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ print_help () {
1717
echo " --tag=VALUE Specify an image tag to use (default is latest)"
1818
echo " --name=VALUE Name of the docker container instantiated"
1919
echo " (default is 'wine')"
20-
echo " --arm64 Start the containter using linux/arm64 platform for ARM"
21-
echo " and Apple Silicon (M1) native image"
2220
echo " --as-root Start the container as root"
2321
echo " --as-me Start the container using your current username, UID and"
2422
echo " GID (default when alternate --home value specified)"
@@ -340,6 +338,7 @@ run_container () {
340338
add_run_arg --rm
341339
add_run_arg --hostname="$(hostname)"
342340
add_run_arg --name="${CONTAINER_NAME}"
341+
add_run_arg --platform="linux/amd64"
343342
add_run_arg --shm-size="${SHM_SIZE}"
344343
add_run_arg --workdir="${WORKDIR}"
345344
add_run_arg_timezone
@@ -426,10 +425,6 @@ while [ $# -gt 0 ]; do
426425
--name=*)
427426
CONTAINER_NAME="${1#*=}"
428427
;;
429-
--arm64)
430-
add_run_arg --platform="linux/arm64"
431-
IMAGE_TAG="arm64"
432-
;;
433428
--as-root)
434429
add_run_arg --env="RUN_AS_ROOT=yes"
435430
WORKDIR="/"

0 commit comments

Comments
 (0)