Can it be used as base image for a Dockerfile.windows?
Hi, I have my own node script that i run on linux. Would it be possible to make it work with windows? I tried importing it but it doesnt work. Did you have some kind of guide on how to setup it correctly for this usecase? Thanks
Sorry but I do not really understand what you mean exactly.
I mean to use it like a base image, something like
FROM dockurr/windows
ENV IS_DOCKER /tmp/install
ENV INST_SCRIPTS /tmp/install
RUN apt-get install -y dos2unix
WORKDIR /app
COPY . .
EXPOSE 8080
RUN dos2unix container_start_windows.sh
ENTRYPOINT ["bash", "container_start_windows.sh"]
I cannot think of any reason why you should not be able to use this image as a base image (because it is possible with every Docker image).
What is the error you run into?
Great. I want to run some scripts after install on windows instead of linux. Where to put them?
For example if I add to the Dockerfile:
RUN start firefox it will be executed on linux
I'm looking for a way to run it on the windows terminal once it's ready
Maybe something like this? But what the ID will be?
qm guest exec ID -- c:\\path\\to\\exe /with /arguments
See https://github.com/dockur/windows/issues/187 on how to do that.
The suggested solution requires editing the xml file wich is part of the base image, so if I use it as it is i cant edit the xml or can I? Exposing some kind of reverse console to windows would be easier to use probably.
You override the XML in the base image by
volumes:
- /example/custom.xml:/run/assets/win11x64.xml
So there is no need to change the image itself.
Thats seem more like a docker compose thing, no? A Dockerfile doesnt support volumes
Yes those lines need to be added to your composefile, not the dockerfile.
Since version 2.22, this can now be done much easier, see: https://github.com/dockur/windows?tab=readme-ov-file#how-do-i-run-a-script-after-installation