windows icon indicating copy to clipboard operation
windows copied to clipboard

error build wintools

Open HyperBeats opened this issue 11 months ago • 1 comments

Hello, as soon as I issue the command

"docker build -t windows . to build a custom image locally I get a wimtools install error

dockers version: Docker version 25.0.4, build 1a576c5 linux version: Debian GNU/Linux 11 (bullseye) x86_64

error code:

root@debian-s-4vcpu-8gb-amd-fra1-01:~/windows# docker build -t windows .
[+] Building 11.1s (9/15)                                                                                                               docker:default
 => [internal] load build definition from Dockerfile                                                                                              0.0s
 => => transferring dockerfile: 1.03kB                                                                                                            0.0s
 => [internal] load metadata for docker.io/qemux/qemu-docker:4.18                                                                                 1.6s
 => [internal] load .dockerignore                                                                                                                 0.0s
 => => transferring context: 160B                                                                                                                 0.0s
 => FROM docker.io/qemux/qemu-docker:4.18@sha256:f30366292b6936540840e6b5f8c96f6410f937b51fc87e8cd873ba6e137db6ac                                 3.9s
 => => resolve docker.io/qemux/qemu-docker:4.18@sha256:f30366292b6936540840e6b5f8c96f6410f937b51fc87e8cd873ba6e137db6ac                           0.0s
 => => sha256:83c839cf14b519319ad8514c61041ce7152c85a46a3d02c1a84e5f734b066b54 43.64MB / 43.64MB                                                  0.3s
 => => sha256:a851f4efc55853c9e58640d6e766f782660c8a360f57b9183451c3275d91669a 11.38kB / 11.38kB                                                  0.3s
 => => sha256:f30366292b6936540840e6b5f8c96f6410f937b51fc87e8cd873ba6e137db6ac 1.50kB / 1.50kB                                                    0.0s
 => => sha256:708f74e39763a4ad9574cbf8328caf4e883ed96b68af83a68ee4380eaca58b85 2.17kB / 2.17kB                                                    0.0s
 => => sha256:aeecb718da87230300a6f31b5bb8eed591120e5a3e38e1285609dc209ac55c80 5.49kB / 5.49kB                                                    0.0s
 => => sha256:8d4e4d7f5b9cd32a5e5d06b89a72ae48cf616523b8f0e822725dcb9f6e3a643e 31.74MB / 31.74MB                                                  0.8s
 => => sha256:7407a27e216150608b063dfc3925e23f130bdbeb8ef7c975fef6b948f9123337 3.25kB / 3.25kB                                                    0.5s
 => => sha256:004716a87cb4899a933bba5b5ca15e05657dd870378a2cfc3a080fa881c7460b 11.14kB / 11.14kB                                                  0.5s
 => => sha256:a7d8b6aafef684e8027f981fe30dbfe88ee7e8812779295fd95c3db9761b5e83 818B / 818B                                                        0.6s
 => => sha256:c169a6a8d94ce26398fbab0d175a646f768b4b8dcd9712283d92f8a6e1daa160 136B / 136B                                                        0.6s
 => => extracting sha256:8d4e4d7f5b9cd32a5e5d06b89a72ae48cf616523b8f0e822725dcb9f6e3a643e                                                         1.3s
 => => extracting sha256:83c839cf14b519319ad8514c61041ce7152c85a46a3d02c1a84e5f734b066b54                                                         1.4s
 => => extracting sha256:a851f4efc55853c9e58640d6e766f782660c8a360f57b9183451c3275d91669a                                                         0.0s
 => => extracting sha256:7407a27e216150608b063dfc3925e23f130bdbeb8ef7c975fef6b948f9123337                                                         0.0s
 => => extracting sha256:004716a87cb4899a933bba5b5ca15e05657dd870378a2cfc3a080fa881c7460b                                                         0.0s
 => => extracting sha256:a7d8b6aafef684e8027f981fe30dbfe88ee7e8812779295fd95c3db9761b5e83                                                         0.0s
 => => extracting sha256:c169a6a8d94ce26398fbab0d175a646f768b4b8dcd9712283d92f8a6e1daa160                                                         0.0s
 => [internal] load build context                                                                                                                 0.0s
 => => transferring context: 258.61kB                                                                                                             0.0s
 => https://github.com/qemus/virtiso/releases/download/v0.1.248/virtio-win-0.1.248.iso                                                            0.5s
 => https://raw.githubusercontent.com/christgau/wsdd/master/src/wsdd.py                                                                           0.2s
 => [stage-0 1/8] COPY --from=qemux/qemu-docker:4.18 / /                                                                                          1.2s
 => ERROR [stage-0 2/8] RUN apt-get update     && apt-get --no-install-recommends -y install         curl         7zip         wsdd         samb  3.6s
------
 > [stage-0 2/8] RUN apt-get update     && apt-get --no-install-recommends -y install         curl         7zip         wsdd         samba         wimtools         dos2unix         cabextract         genisoimage         libxml2-utils     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*:
0.304 Get:1 http://deb.debian.org/debian trixie InRelease [157 kB]
0.315 Get:2 http://deb.debian.org/debian trixie-updates InRelease [45.1 kB]
0.319 Get:3 http://deb.debian.org/debian-security trixie-security InRelease [43.5 kB]
0.382 Get:4 http://deb.debian.org/debian trixie/main amd64 Packages [9102 kB]
1.398 Fetched 9347 kB in 1s (8502 kB/s)
1.398 Reading package lists...
2.505 Reading package lists...
3.297 Building dependency tree...
3.547 Reading state information...
3.590 Package wimtools is not available, but is referred to by another package.
3.590 This may mean that the package is missing, has been obsoleted, or
3.590 is only available from another source
3.590
3.591 E: Package 'wimtools' has no installation candidate
------
Dockerfile:8
--------------------
   7 |
   8 | >>> RUN apt-get update \
   9 | >>>     && apt-get --no-install-recommends -y install \
  10 | >>>         curl \
  11 | >>>         7zip \
  12 | >>>         wsdd \
  13 | >>>         samba \
  14 | >>>         wimtools \
  15 | >>>         dos2unix \
  16 | >>>         cabextract \
  17 | >>>         genisoimage \
  18 | >>>         libxml2-utils \
  19 | >>>     && apt-get clean \
  20 | >>>     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  21 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update     && apt-get --no-install-recommends -y install         curl         7zip         wsdd         samba         wimtools         dos2unix         cabextract         genisoimage         libxml2-utils     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" did not complete successfully: exit code: 100
root@debian-s-4vcpu-8gb-amd-fra1-01:~/windows# ^C

my docker-compose.yml file

services:
  windows:
    image: dockurr/windows
    container_name: windows
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    volumes:
      - /storage/media/windows-disk:/storage
    stop_grace_period: 2m
    environment:
      #BOOT_MODE for win11 - disables Secure Boot + TPM + Hyper-V
      BOOT_MODE: "windows_plain"
      VERSION: "win10"
      RAM_SIZE: "4G"
      CPU_CORES: "2"
      DISK_SIZE: "64G"
    restart: on-failure

HyperBeats avatar Mar 15 '24 16:03 HyperBeats

First of all I would try to docker-compose up in order to run docker using your compose file. It seems you are running only a docker container using a Dockerfile that you might have downloaded from the git repo.

Move into the directory where the docker-compose file is and try docker-compose up - does it still fail at the wimtools part?

scherddel avatar Mar 15 '24 20:03 scherddel

First of all I would try to docker-compose up in order to run docker using your compose file. It seems you are running only a docker container using a Dockerfile that you might have downloaded from the git repo.

Move into the directory where the docker-compose file is and try docker-compose up - does it still fail at the wimtools part?

I dont think this has anything to do with docker-compose. The docker-compose file is there, to bring up an existing image and create a container from it. But clearly @HyperBeats wants to build the image himself. I am trying to do this too and i am facing the exact same issue as him. For me too i get this error message:

 > [stage-0 2/8] RUN apt-get update     && apt-get --no-install-recommends -y install         curl         7zip         wsdd         samba         wimtools         dos2unix         cabextract         genisoimage         libxml2-utils         libvirt-daemon-system         virtinst     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*:
0.442 Get:1 http://deb.debian.org/debian trixie InRelease [157 kB]
0.509 Get:2 http://deb.debian.org/debian trixie-updates InRelease [45.1 kB]
0.567 Get:3 http://deb.debian.org/debian-security trixie-security InRelease [43.5 kB]
0.620 Get:4 http://deb.debian.org/debian trixie/main amd64 Packages [9056 kB]
2.483 Fetched 9302 kB in 2s (4425 kB/s)
2.483 Reading package lists...
3.402 Reading package lists...
4.263 Building dependency tree...
4.506 Reading state information...
4.534 Package wimtools is not available, but is referred to by another package.
4.534 This may mean that the package is missing, has been obsoleted, or
4.534 is only available from another source
4.534
4.538 E: Package 'wimtools' has no installation candidate
------
Dockerfile:8
--------------------
   7 |
   8 | >>> RUN apt-get update \
   9 | >>>     && apt-get --no-install-recommends -y install \
  10 | >>>         curl \
  11 | >>>         7zip \
  12 | >>>         wsdd \
  13 | >>>         samba \
  14 | >>>         wimtools \
  15 | >>>         dos2unix \
  16 | >>>         cabextract \
  17 | >>>         genisoimage \
  18 | >>>         libxml2-utils \
  19 | >>>         libvirt-daemon-system \
  20 | >>>         virtinst \
  21 | >>>     && apt-get clean \
  22 | >>>     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  23 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update     && apt-get --no-install-recommends -y install         curl         7zip         wsdd         samba
wimtools         dos2unix         cabextract         genisoimage         libxml2-utils         libvirt-daemon-system         virtinst     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" did not complete successfully: exit code: 100

Joly0 avatar Mar 19 '24 19:03 Joly0

Ahhh it seems wimtools has been removed from debians trixie... Not sure why but an idea that seems to work is to add the following lines to your Dockerfile (as line 8+9, right before the RUN apt-get: ...

RUN echo "deb http://deb.debian.org/debian/ bookworm main" >> /etc/apt/sources.list.d/bookworm.list

RUN {
echo "Package: *";
echo "Pin: release n=trixie";
echo "Pin-Priority: 900";
echo "";
echo "Package: *";
echo "Pin: release n=bookworm";
echo "Pin-Priority: 400";
} > /etc/apt/preferences.d/preferences

...

scherddel avatar Mar 19 '24 19:03 scherddel

Had to use these commands:

RUN echo "deb http://deb.debian.org/debian/ bookworm main" >> /etc/apt/sources.list.d/bookworm.list

RUN echo -e "Package: *\nPin: release n=trixie\nPin-Priority: 900\nPackage: *\nPin: release n=bookworm\nPin-Priority: 400" | tee /etc/apt/preferences.d/preferences > /dev/null

but otherwise that worked

Joly0 avatar Mar 19 '24 20:03 Joly0

i while try

HyperBeats avatar Mar 19 '24 20:03 HyperBeats

That seems to work, it should be added to the Dockerfile.

skye0402 avatar Mar 21 '24 22:03 skye0402

I updated the Dockerfile now to get the package from the sid branch, until its available again in trixie.

kroese avatar Mar 25 '24 14:03 kroese