mirror of
https://github.com/hectorm/docker-qemu-reactos
synced 2025-04-04 14:56:59 +00:00
Compare commits
184 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1dbbeb4fbd | ||
|
cb8849fc1e | ||
|
38c0c79d76 | ||
|
3e78cb0215 | ||
|
1a91d57625 | ||
|
5028c72619 | ||
|
a5d152ae24 | ||
|
3d5f2b942b | ||
|
af641b071b | ||
|
d602925a09 | ||
|
efd183861a | ||
|
4623b1e3c9 | ||
|
ae82178446 | ||
|
b6551ba201 | ||
|
e11cb75fe7 | ||
|
4bba179967 | ||
|
26879a25d1 | ||
|
eac2b07c5e | ||
|
f7f18c3d79 | ||
|
36e571bc18 | ||
|
6f8992051c | ||
|
21b6e9e4a1 | ||
|
7ac900a3a6 | ||
|
7efa177e18 | ||
|
f8989d290c | ||
|
cab0ceab3d | ||
|
77a3b127f1 | ||
|
883b7e28e6 | ||
|
e6ca925a94 | ||
|
a6b0870176 | ||
|
d08e483047 | ||
|
02047beb30 | ||
|
98a95a37ae | ||
|
dfe8ce097f | ||
|
f726ef51ca | ||
|
9518cdb808 | ||
|
b8e1431fdd | ||
|
8d2b773d50 | ||
|
114e5186cc | ||
|
aca7de648f | ||
|
af4005ca28 | ||
|
aec1c68eee | ||
|
f24db90bce | ||
|
2f5f595298 | ||
|
d08fa35863 | ||
|
823e89db2a | ||
|
764f04253b | ||
|
2885573d11 | ||
|
2c1d0324ff | ||
|
f6b8463bfa | ||
|
d909ccd1ef | ||
|
4dee4565b3 | ||
|
2d1ecf4c4d | ||
|
40e20bd753 | ||
|
5ce4479549 | ||
|
6bf0444e8f | ||
|
97ae8b86a9 | ||
|
d6ce907a7a | ||
|
daffd49dac | ||
|
4659e2b9da | ||
|
20808cf8a5 | ||
|
2f8f43e6f7 | ||
|
d3bb0c7b75 | ||
|
9bc4cbe849 | ||
|
2e3431c0ae | ||
|
cd9efa505c | ||
|
f25b06b04c | ||
|
ebaac7cb34 | ||
|
24337c3892 | ||
|
526a0afb0d | ||
|
4b18db3c42 | ||
|
bf8bcd369c | ||
|
407a6d48a8 | ||
|
099a608499 | ||
|
6dc6cc3d6c | ||
|
75f1a2e6f0 | ||
|
e9b0ec8326 | ||
|
a4a42cd203 | ||
|
5aaac72250 | ||
|
3abd969ba5 | ||
|
24109f30c5 | ||
|
69f35f3305 | ||
|
b7363ac498 | ||
|
4ceea99e10 | ||
|
013512b665 | ||
|
900242aa90 | ||
|
d1e8f99a06 | ||
|
c3184e7aee | ||
|
e3a5ebf1e7 | ||
|
b81adc41bd | ||
|
23e26cf252 | ||
|
78d19ebe17 | ||
|
fc8f7730ea | ||
|
fd018a9832 | ||
|
dca69730d0 | ||
|
d04ea44a0c | ||
|
30cccc21ff | ||
|
90a037e348 | ||
|
16e47502d0 | ||
|
b4d1c623c1 | ||
|
49ed398608 | ||
|
cc0409831a | ||
|
fd9402c45a | ||
|
b1c15bd06a | ||
|
01b5d31067 | ||
|
10fe1a6111 | ||
|
92a0f8589a | ||
|
ac92f70438 | ||
|
e91306b997 | ||
|
9a75519e1d | ||
|
1e9eb26b35 | ||
|
4400e4019f | ||
|
606de052cc | ||
|
92dd9a8e7e | ||
|
29e5bec8ba | ||
|
d6f9f65623 | ||
|
2adbc66a7c | ||
|
88a1b868a8 | ||
|
55587ba1f8 | ||
|
222d899993 | ||
|
a030d46efc | ||
|
c6b529b31d | ||
|
d065da672e | ||
|
14e5c6dc2d | ||
|
2ccc1af63a | ||
|
49e2d5e9ef | ||
|
1fd9c253a0 | ||
|
420f16c785 | ||
|
4695fb28bc | ||
|
b99b5590fc | ||
|
f67b19be3f | ||
|
ebb73bd89d | ||
|
d9b34fadd2 | ||
|
c4905ecf00 | ||
|
b261afcbd2 | ||
|
8b24554e17 | ||
|
7b0a29132e | ||
|
fff158a37e | ||
|
fc53e0bddf | ||
|
400683c210 | ||
|
2d255d5ec4 | ||
|
f68b345d07 | ||
|
89493c8540 | ||
|
e2e4cfa564 | ||
|
d514fd323f | ||
|
984e79474d | ||
|
3d09e519dd | ||
|
4d3cb166cd | ||
|
8f0793db9e | ||
|
7687a6b533 | ||
|
1a5a9fd5b3 | ||
|
97671e1dab | ||
|
a8d41d1034 | ||
|
8e76e78689 | ||
|
e680530071 | ||
|
fdddb96dcf | ||
|
3db499da11 | ||
|
428265e435 | ||
|
7fa7bbe095 | ||
|
27e8c8da4d | ||
|
245b10bae0 | ||
|
9cca08e419 | ||
|
b5b84bbc40 | ||
|
7457cfa4c1 | ||
|
8786d2f5cb | ||
|
9c32e94ca5 | ||
|
7820a0bd4e | ||
|
8eb94c4909 | ||
|
18d364c130 | ||
|
80859383e5 | ||
|
e6e0f94753 | ||
|
5c63e8ccea | ||
|
dbb8456015 | ||
|
6915f70693 | ||
|
39c58a6b72 | ||
|
d9642b180d | ||
|
81a66b5ee2 | ||
|
473a8b4932 | ||
|
be3bfeeba6 | ||
|
49607d7962 | ||
|
11864d1c2b | ||
|
549e831abf | ||
|
bd84e60962 | ||
|
693468585b |
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*.bat eol=crlf
|
||||||
|
*.inf eol=crlf
|
19
.github/dependabot.yml
vendored
Normal file
19
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
groups:
|
||||||
|
docker-all:
|
||||||
|
patterns: ["*"]
|
||||||
|
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "monthly"
|
||||||
|
groups:
|
||||||
|
github-actions-all:
|
||||||
|
patterns: ["*"]
|
134
.github/workflows/main.yml
vendored
Normal file
134
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
|
name: "Main"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: ["*"]
|
||||||
|
branches: ["*"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["*"]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-common-stages:
|
||||||
|
name: "Build common stages"
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
permissions:
|
||||||
|
contents: "read"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
stage: ["build"]
|
||||||
|
steps:
|
||||||
|
- name: "Checkout project"
|
||||||
|
uses: "actions/checkout@v4"
|
||||||
|
- name: "Build and save image"
|
||||||
|
run: |
|
||||||
|
make \
|
||||||
|
IMAGE_REGISTRY="localhost" IMAGE_NAMESPACE="stage" IMAGE_PROJECT="${{ matrix.stage }}" \
|
||||||
|
IMAGE_BUILD_OPTS="--pull --target ${{ matrix.stage }} --build-arg BUILDKIT_INLINE_CACHE=1" \
|
||||||
|
build-native-image save-native-image
|
||||||
|
- name: "Upload artifacts"
|
||||||
|
uses: "actions/upload-artifact@v4"
|
||||||
|
with:
|
||||||
|
name: "dist-common-stages"
|
||||||
|
path: "./dist/"
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: "Build ${{ matrix.arch }} image"
|
||||||
|
needs: ["build-common-stages"]
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
permissions:
|
||||||
|
contents: "read"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: ["native", "amd64", "arm64v8"]
|
||||||
|
steps:
|
||||||
|
- name: "Checkout project"
|
||||||
|
uses: "actions/checkout@v4"
|
||||||
|
- name: "Download artifacts"
|
||||||
|
uses: "actions/download-artifact@v4"
|
||||||
|
with:
|
||||||
|
name: "dist-common-stages"
|
||||||
|
path: "./dist/"
|
||||||
|
- name: "Load common stages"
|
||||||
|
run: |
|
||||||
|
docker system prune --all --force
|
||||||
|
make IMAGE_REGISTRY="localhost" IMAGE_NAMESPACE="stage" IMAGE_PROJECT="build" load-native-image clean
|
||||||
|
- name: "Register binfmt entries"
|
||||||
|
if: "matrix.arch != 'native'"
|
||||||
|
run: |
|
||||||
|
make binfmt-register
|
||||||
|
- name: "Build and save image"
|
||||||
|
run: |
|
||||||
|
make \
|
||||||
|
IMAGE_BUILD_OPTS="--cache-from localhost/stage/build:latest" \
|
||||||
|
"build-${{ matrix.arch }}-image" "save-${{ matrix.arch }}-image"
|
||||||
|
- name: "Upload artifacts"
|
||||||
|
if: "startsWith(github.ref, 'refs/tags/v') && matrix.arch != 'native'"
|
||||||
|
uses: "actions/upload-artifact@v4"
|
||||||
|
with:
|
||||||
|
name: "dist-${{ matrix.arch }}"
|
||||||
|
path: "./dist/"
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
push:
|
||||||
|
name: "Push ${{ matrix.arch }} image"
|
||||||
|
if: "startsWith(github.ref, 'refs/tags/v')"
|
||||||
|
needs: ["build"]
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
permissions:
|
||||||
|
contents: "read"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: ["amd64", "arm64v8"]
|
||||||
|
steps:
|
||||||
|
- name: "Checkout project"
|
||||||
|
uses: "actions/checkout@v4"
|
||||||
|
- name: "Download artifacts"
|
||||||
|
uses: "actions/download-artifact@v4"
|
||||||
|
with:
|
||||||
|
name: "dist-${{ matrix.arch }}"
|
||||||
|
path: "./dist/"
|
||||||
|
- name: "Login to Docker Hub"
|
||||||
|
uses: "docker/login-action@v3"
|
||||||
|
with:
|
||||||
|
registry: "docker.io"
|
||||||
|
username: "${{ secrets.DOCKERHUB_USERNAME }}"
|
||||||
|
password: "${{ secrets.DOCKERHUB_TOKEN }}"
|
||||||
|
- name: "Load and push image"
|
||||||
|
run: |
|
||||||
|
make "load-${{ matrix.arch }}-image" "push-${{ matrix.arch }}-image"
|
||||||
|
|
||||||
|
push-manifest:
|
||||||
|
name: "Push manifest"
|
||||||
|
if: "startsWith(github.ref, 'refs/tags/v')"
|
||||||
|
needs: ["push"]
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
permissions:
|
||||||
|
contents: "read"
|
||||||
|
steps:
|
||||||
|
- name: "Checkout project"
|
||||||
|
uses: "actions/checkout@v4"
|
||||||
|
- name: "Login to Docker Hub"
|
||||||
|
uses: "docker/login-action@v3"
|
||||||
|
with:
|
||||||
|
registry: "docker.io"
|
||||||
|
username: "${{ secrets.DOCKERHUB_USERNAME }}"
|
||||||
|
password: "${{ secrets.DOCKERHUB_TOKEN }}"
|
||||||
|
- name: "Push manifest"
|
||||||
|
run: |
|
||||||
|
make push-cross-manifest
|
||||||
|
|
||||||
|
publish-github-release:
|
||||||
|
name: "Publish GitHub release"
|
||||||
|
if: "startsWith(github.ref, 'refs/tags/v')"
|
||||||
|
needs: ["push-manifest"]
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
permissions:
|
||||||
|
contents: "write"
|
||||||
|
steps:
|
||||||
|
- name: "Publish"
|
||||||
|
uses: "hectorm/ghaction-release@066200d04c3549852afa243d631ea3dc93390f68"
|
22
.github/workflows/rebuild-latest-release.yml
vendored
Normal file
22
.github/workflows/rebuild-latest-release.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
|
name: "Rebuild latest release"
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "20 04 * * 1"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
trigger-rebuild:
|
||||||
|
name: "Trigger rebuild"
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
permissions:
|
||||||
|
actions: "write"
|
||||||
|
contents: "read"
|
||||||
|
steps:
|
||||||
|
- name: "Trigger rebuild"
|
||||||
|
uses: "hectorm/ghaction-trigger-workflow@04c79e7a4e0c0b94bbcff3829f38359e34f1ea9e"
|
||||||
|
with:
|
||||||
|
workflow-id: "main.yml"
|
@ -1,38 +0,0 @@
|
|||||||
image: docker:stable
|
|
||||||
|
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build:images
|
|
||||||
- push:images
|
|
||||||
|
|
||||||
variables:
|
|
||||||
DOCKER_HOST: tcp://docker:2375
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
|
|
||||||
build:image:
|
|
||||||
stage: build:images
|
|
||||||
before_script:
|
|
||||||
- docker info
|
|
||||||
- apk add --no-cache coreutils git make xz
|
|
||||||
script:
|
|
||||||
- make build-image save-image
|
|
||||||
artifacts:
|
|
||||||
expire_in: 1 hour
|
|
||||||
paths:
|
|
||||||
- dist/
|
|
||||||
|
|
||||||
push:image:
|
|
||||||
stage: push:images
|
|
||||||
before_script:
|
|
||||||
- apk add --no-cache coreutils git make xz
|
|
||||||
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}" >/dev/null 2>&1
|
|
||||||
script:
|
|
||||||
- make load-image push-image
|
|
||||||
only:
|
|
||||||
- /^v([0-9.]+)(-.+)?$/
|
|
||||||
except:
|
|
||||||
- branches
|
|
||||||
dependencies:
|
|
||||||
- build:image
|
|
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"*.inf": "properties"
|
||||||
|
}
|
||||||
|
}
|
56
Dockerfile
56
Dockerfile
@ -1,56 +0,0 @@
|
|||||||
FROM docker.io/debian:sid
|
|
||||||
|
|
||||||
# Environment
|
|
||||||
ENV QEMU_CPU=2
|
|
||||||
ENV QEMU_RAM=1024M
|
|
||||||
ENV QEMU_DISK_SIZE=16G
|
|
||||||
ENV QEMU_DISK_FORMAT=qcow2
|
|
||||||
ENV QEMU_KEYBOARD=en-us
|
|
||||||
ENV QEMU_NET_DEVICE=rtl8139
|
|
||||||
ENV QEMU_NET_OPTIONS=hostfwd=tcp::13389-:3389,hostfwd=tcp::15900-:5900
|
|
||||||
ENV QEMU_BOOT_ORDER=cd
|
|
||||||
ENV QEMU_BOOT_MENU=off
|
|
||||||
ENV QEMU_KVM=false
|
|
||||||
|
|
||||||
# Install system packages
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
ca-certificates \
|
|
||||||
curl \
|
|
||||||
net-tools \
|
|
||||||
novnc \
|
|
||||||
procps \
|
|
||||||
qemu-kvm \
|
|
||||||
qemu-system-x86 \
|
|
||||||
qemu-utils \
|
|
||||||
runit \
|
|
||||||
unzip \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Create data directories
|
|
||||||
RUN mkdir -p /var/lib/qemu/images/ /var/lib/qemu/iso/
|
|
||||||
|
|
||||||
# Download ReactOS ISO
|
|
||||||
ARG REACTOS_ISO_URL=https://downloads.sourceforge.net/project/reactos/ReactOS/0.4.11/ReactOS-0.4.11-iso.zip
|
|
||||||
ARG REACTOS_ISO_CHECKSUM=68120b3481c99c6b0563d5f3ec469ab197f2c8abc38d29adba4c40d01acd92c8
|
|
||||||
RUN mkdir /tmp/reactos/ \
|
|
||||||
&& curl -Lo /tmp/reactos/reactos.zip "${REACTOS_ISO_URL}" \
|
|
||||||
&& echo "${REACTOS_ISO_CHECKSUM} /tmp/reactos/reactos.zip" | sha256sum -c \
|
|
||||||
&& unzip /tmp/reactos/reactos.zip -d /tmp/reactos/ \
|
|
||||||
&& mv /tmp/reactos/*.iso /var/lib/qemu/iso/reactos.iso \
|
|
||||||
&& rm -rf /tmp/reactos/
|
|
||||||
|
|
||||||
# Copy services
|
|
||||||
COPY --chown=root:root scripts/service/ /etc/service/
|
|
||||||
|
|
||||||
# Copy scripts
|
|
||||||
COPY --chown=root:root scripts/bin/ /usr/local/bin/
|
|
||||||
|
|
||||||
# Expose ports
|
|
||||||
## VNC
|
|
||||||
EXPOSE 5900/tcp
|
|
||||||
## noVNC
|
|
||||||
EXPOSE 6080/tcp
|
|
||||||
|
|
||||||
CMD ["/usr/local/bin/docker-foreground-cmd"]
|
|
168
Dockerfile.m4
Normal file
168
Dockerfile.m4
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
m4_changequote([[, ]])
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
## "build" stage
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
FROM --platform=${BUILDPLATFORM} docker.io/ubuntu:24.04 AS build
|
||||||
|
|
||||||
|
# Install system packages
|
||||||
|
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
binutils-mingw-w64-i686 \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
gcc-mingw-w64-i686 \
|
||||||
|
genisoimage \
|
||||||
|
make \
|
||||||
|
p7zip-full \
|
||||||
|
qemu-system-x86 \
|
||||||
|
qemu-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Download noVNC
|
||||||
|
ARG NOVNC_VERSION=v1.5.0
|
||||||
|
ARG NOVNC_TARBALL_URL=https://github.com/novnc/noVNC/archive/${NOVNC_VERSION}.tar.gz
|
||||||
|
ARG NOVNC_TARBALL_CHECKSUM=6a73e41f98388a5348b7902f54b02d177cb73b7e5eb0a7a0dcf688cc2c79b42a
|
||||||
|
RUN curl -Lo /tmp/novnc.tgz "${NOVNC_TARBALL_URL:?}"
|
||||||
|
RUN printf '%s' "${NOVNC_TARBALL_CHECKSUM:?} /tmp/novnc.tgz" | sha256sum -c
|
||||||
|
RUN mkdir /tmp/novnc/ && tar -xzf /tmp/novnc.tgz --strip-components=1 -C /tmp/novnc/
|
||||||
|
|
||||||
|
# Download Websockify
|
||||||
|
ARG WEBSOCKIFY_VERSION=v0.12.0
|
||||||
|
ARG WEBSOCKIFY_TARBALL_URL=https://github.com/novnc/websockify/archive/${WEBSOCKIFY_VERSION}.tar.gz
|
||||||
|
ARG WEBSOCKIFY_TARBALL_CHECKSUM=37448ec992ef626f29558404cf6535592d02894ec1d5f0990a8c62621b39a967
|
||||||
|
RUN curl -Lo /tmp/websockify.tgz "${WEBSOCKIFY_TARBALL_URL:?}"
|
||||||
|
RUN printf '%s' "${WEBSOCKIFY_TARBALL_CHECKSUM:?} /tmp/websockify.tgz" | sha256sum -c
|
||||||
|
RUN mkdir /tmp/websockify/ && tar -xzf /tmp/websockify.tgz --strip-components=1 -C /tmp/websockify/
|
||||||
|
|
||||||
|
# Download and build srvany-ng
|
||||||
|
ARG SRVANY_NG_TARBALL_URL=https://github.com/hectorm/srvany-ng/archive/refs/tags/v1.0.tar.gz
|
||||||
|
ARG SRVANY_NG_TARBALL_CHECKSUM=62d4c85d5dbef86d57bf5d21ff913bce81b821735df293968e1706f85096c8b0
|
||||||
|
RUN curl -Lo /tmp/srvany-ng.tgz "${SRVANY_NG_TARBALL_URL:?}"
|
||||||
|
RUN printf '%s' "${SRVANY_NG_TARBALL_CHECKSUM:?} /tmp/srvany-ng.tgz" | sha256sum -c
|
||||||
|
RUN mkdir /tmp/srvany-ng/ && tar -xzf /tmp/srvany-ng.tgz --strip-components=1 -C /tmp/srvany-ng/
|
||||||
|
RUN make -C /tmp/srvany-ng/ build
|
||||||
|
|
||||||
|
# Download ncat
|
||||||
|
ARG NCAT_ZIP_URL=https://nmap.org/dist/ncat-portable-5.59BETA1.zip
|
||||||
|
ARG NCAT_ZIP_CHECKSUM=9cdc2e688410f4563af7002d8dfa3f8a5710f15f6d409be2cab4e87890c91d1c
|
||||||
|
RUN curl -Lo /tmp/ncat.zip "${NCAT_ZIP_URL:?}"
|
||||||
|
RUN printf '%s' "${NCAT_ZIP_CHECKSUM:?} /tmp/ncat.zip" | sha256sum -c
|
||||||
|
RUN 7z e /tmp/ncat.zip -so '**/*.exe' > /tmp/ncat.exe
|
||||||
|
|
||||||
|
# Download Samba
|
||||||
|
ARG SAMBA_EXE_URL=https://svn.reactos.org/packages/samba-for-ReactOSv1.3.exe
|
||||||
|
ARG SAMBA_EXE_CHECKSUM=c3f55cd7a4069cd682cbdca3954c425f6657e3a1aba786e3d1559448e9f849a3
|
||||||
|
RUN curl -Lo /tmp/samba.exe "${SAMBA_EXE_URL:?}"
|
||||||
|
RUN printf '%s' "${SAMBA_EXE_CHECKSUM:?} /tmp/samba.exe" | sha256sum -c
|
||||||
|
|
||||||
|
# Download BusyBox
|
||||||
|
ARG BUSYBOX_EXE_URL=https://frippery.org/files/busybox/busybox-w32-FRP-5398-g89ae34445.exe
|
||||||
|
ARG BUSYBOX_EXE_CHECKSUM=e311f576b6222a6a30fc892c4be13bd42387bcca65563e7ffff7004b9460b86c
|
||||||
|
RUN curl -Lo /tmp/busybox.exe "${BUSYBOX_EXE_URL:?}"
|
||||||
|
RUN printf '%s' "${BUSYBOX_EXE_CHECKSUM:?} /tmp/busybox.exe" | sha256sum -c
|
||||||
|
|
||||||
|
# Download and install ReactOS
|
||||||
|
ARG REACTOS_ISO_URL=https://downloads.sourceforge.net/reactos/ReactOS-0.4.14-release-119-gce0b4ff-iso.zip
|
||||||
|
ARG REACTOS_ISO_CHECKSUM=2937a619c9988d9c697930160e378d21048069c74e224b5c5ff6be470784b7d8
|
||||||
|
RUN curl -Lo /tmp/reactos.zip "${REACTOS_ISO_URL:?}"
|
||||||
|
RUN printf '%s' "${REACTOS_ISO_CHECKSUM:?} /tmp/reactos.zip" | sha256sum -c
|
||||||
|
RUN 7z e /tmp/reactos.zip -so '*.iso' > /tmp/reactos.iso \
|
||||||
|
&& 7z x /tmp/reactos.iso -o/tmp/reactos/ \
|
||||||
|
&& rm -f /tmp/reactos.iso
|
||||||
|
COPY --chown=root:root ./data/iso/ /tmp/reactos/
|
||||||
|
RUN install -D /tmp/srvany-ng/srvany-ng.exe /tmp/reactos/reactos/3rdParty/srvany-ng.exe
|
||||||
|
RUN install -D /tmp/ncat.exe /tmp/reactos/reactos/3rdParty/ncat.exe
|
||||||
|
RUN install -D /tmp/samba.exe /tmp/reactos/reactos/3rdParty/samba.exe
|
||||||
|
RUN install -D /tmp/busybox.exe /tmp/reactos/reactos/3rdParty/busybox.exe
|
||||||
|
RUN mkisofs -no-emul-boot -iso-level 4 -eltorito-boot loader/isoboot.bin -o /tmp/reactos.iso /tmp/reactos/ \
|
||||||
|
&& qemu-img create -f qcow2 /tmp/reactos.qcow2 128G \
|
||||||
|
&& timeout 900 qemu-system-x86_64 \
|
||||||
|
-machine pc -smp 2 -m 512M -accel tcg \
|
||||||
|
-device VGA -display none -serial stdio \
|
||||||
|
-device e1000,netdev=n0 -netdev user,id=n0,ipv4=on,ipv6=off,net=10.0.2.0/24,host=10.0.2.2,dns=10.0.2.3,dhcpstart=10.0.2.15,restrict=on \
|
||||||
|
-device ide-hd,id=disk0,bus=ide.0,drive=disk0 -blockdev driver=qcow2,node-name=disk0,file.driver=file,file.filename=/tmp/reactos.qcow2 \
|
||||||
|
-device ide-cd,id=cd0,bus=ide.1,drive=cd0 -blockdev driver=raw,node-name=cd0,file.driver=file,file.filename=/tmp/reactos.iso,read-only=on \
|
||||||
|
-boot order=cd,menu=off \
|
||||||
|
-usb -device usb-tablet
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
## "base" stage
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
m4_ifdef([[CROSS_ARCH]], [[FROM docker.io/CROSS_ARCH/ubuntu:24.04]], [[FROM docker.io/ubuntu:24.04]]) AS base
|
||||||
|
|
||||||
|
# Install system packages
|
||||||
|
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
catatonit \
|
||||||
|
net-tools \
|
||||||
|
netcat-openbsd \
|
||||||
|
procps \
|
||||||
|
python3 \
|
||||||
|
qemu-system-x86 \
|
||||||
|
qemu-utils \
|
||||||
|
rlwrap \
|
||||||
|
runit \
|
||||||
|
samba \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
ENV VM_CPU=2
|
||||||
|
ENV VM_RAM=1024M
|
||||||
|
ENV VM_KEYBOARD=en-us
|
||||||
|
ENV VM_NET_EXTRA_OPTIONS=
|
||||||
|
ENV VM_KVM=true
|
||||||
|
ENV SVDIR=/etc/service/
|
||||||
|
|
||||||
|
# Copy noVNC
|
||||||
|
COPY --from=build --chown=root:root /tmp/novnc/ /opt/novnc/
|
||||||
|
|
||||||
|
# Copy Websockify
|
||||||
|
COPY --from=build --chown=root:root /tmp/websockify/ /opt/novnc/utils/websockify/
|
||||||
|
|
||||||
|
# Copy ReactOS disk
|
||||||
|
COPY --from=build --chown=root:root /tmp/reactos.qcow2 /var/lib/qemu/disk/reactos.qcow2
|
||||||
|
|
||||||
|
# Copy Samba config
|
||||||
|
COPY --chown=root:root ./config/samba/ /etc/samba/
|
||||||
|
RUN find /etc/samba/ -type d -not -perm 0755 -exec chmod 0755 '{}' ';'
|
||||||
|
RUN find /etc/samba/ -type f -not -perm 0644 -exec chmod 0644 '{}' ';'
|
||||||
|
|
||||||
|
# Copy services
|
||||||
|
COPY --chown=root:root ./scripts/service/ /etc/service/
|
||||||
|
RUN find /etc/service/ -type d -not -perm 0755 -exec chmod 0755 '{}' ';'
|
||||||
|
RUN find /etc/service/ -type f -not -perm 0755 -exec chmod 0755 '{}' ';'
|
||||||
|
|
||||||
|
# Copy bin scripts
|
||||||
|
COPY --chown=root:root ./scripts/bin/ /usr/local/bin/
|
||||||
|
RUN find /usr/local/bin/ -type d -not -perm 0755 -exec chmod 0755 '{}' ';'
|
||||||
|
RUN find /usr/local/bin/ -type f -not -perm 0755 -exec chmod 0755 '{}' ';'
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/catatonit", "--", "/usr/local/bin/container-init"]
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
## "test" stage
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
FROM base AS test
|
||||||
|
|
||||||
|
RUN if [ "$(uname -m)" = 'x86_64' ]; then \
|
||||||
|
container-init & \
|
||||||
|
printf '%s\n' 'The quick brown fox jumps over the lazy dog' > /mnt/in || exit 1; \
|
||||||
|
printf '%s\n' '@echo off & smbclient -c "get /in C:/local; quit" //10.0.2.2/share noop & exit' | timeout 900 vmshell || exit 1; \
|
||||||
|
printf '%s\n' '@echo off & smbclient -c "put C:/local /out; quit" //10.0.2.2/share noop & exit' | timeout 120 vmshell || exit 1; \
|
||||||
|
cmp -s /mnt/in /mnt/out || exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
## "main" stage
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
FROM base AS main
|
||||||
|
|
||||||
|
# Dummy instruction so BuildKit does not skip the test stage
|
||||||
|
RUN --mount=type=bind,from=test,source=/mnt/,target=/mnt/
|
@ -1,7 +1,7 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Copyright © 2019 Héctor Molinero Fernández
|
Copyright © Héctor Molinero Fernández
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
179
Makefile
179
Makefile
@ -1,77 +1,156 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
SHELL := /bin/sh
|
SHELL := /bin/sh
|
||||||
.SHELLFLAGS := -eu -c
|
.SHELLFLAGS := -euc
|
||||||
|
|
||||||
DOCKER := $(shell command -v docker 2>/dev/null)
|
DOCKER := $(shell command -v docker 2>/dev/null)
|
||||||
GIT := $(shell command -v git 2>/dev/null)
|
GIT := $(shell command -v git 2>/dev/null)
|
||||||
|
M4 := $(shell command -v m4 2>/dev/null)
|
||||||
|
|
||||||
DISTDIR := ./dist
|
DISTDIR := ./dist
|
||||||
VERSION_FILE = ./VERSION
|
DOCKERFILE_TEMPLATE := ./Dockerfile.m4
|
||||||
DOCKERFILE := ./Dockerfile
|
|
||||||
|
|
||||||
IMAGE_REGISTRY := docker.io
|
IMAGE_REGISTRY := docker.io
|
||||||
IMAGE_NAMESPACE := hectormolinero
|
IMAGE_NAMESPACE := hectorm
|
||||||
IMAGE_PROJECT := qemu-reactos
|
IMAGE_PROJECT := qemu-reactos
|
||||||
IMAGE_NAME := $(IMAGE_REGISTRY)/$(IMAGE_NAMESPACE)/$(IMAGE_PROJECT)
|
IMAGE_NAME := $(IMAGE_REGISTRY)/$(IMAGE_NAMESPACE)/$(IMAGE_PROJECT)
|
||||||
|
ifeq ($(shell '$(GIT)' status --porcelain 2>/dev/null),)
|
||||||
IMAGE_VERSION := v0
|
IMAGE_GIT_TAG := $(shell '$(GIT)' tag --list --contains HEAD 2>/dev/null)
|
||||||
ifneq ($(wildcard $(VERSION_FILE)),)
|
IMAGE_GIT_SHA := $(shell '$(GIT)' rev-parse --verify --short HEAD 2>/dev/null)
|
||||||
IMAGE_VERSION := $(shell cat '$(VERSION_FILE)')
|
IMAGE_VERSION := $(if $(IMAGE_GIT_TAG),$(IMAGE_GIT_TAG),$(if $(IMAGE_GIT_SHA),$(IMAGE_GIT_SHA),nil))
|
||||||
|
else
|
||||||
|
IMAGE_GIT_BRANCH := $(shell '$(GIT)' symbolic-ref --short HEAD 2>/dev/null)
|
||||||
|
IMAGE_VERSION := $(if $(IMAGE_GIT_BRANCH),$(IMAGE_GIT_BRANCH)-dirty,nil)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
IMAGE_TARBALL := $(DISTDIR)/$(IMAGE_PROJECT).txz
|
IMAGE_BUILD_OPTS :=
|
||||||
|
|
||||||
|
IMAGE_NATIVE_DOCKERFILE := $(DISTDIR)/Dockerfile
|
||||||
|
IMAGE_NATIVE_TARBALL := $(DISTDIR)/$(IMAGE_PROJECT).tzst
|
||||||
|
IMAGE_AMD64_DOCKERFILE := $(DISTDIR)/Dockerfile.amd64
|
||||||
|
IMAGE_AMD64_TARBALL := $(DISTDIR)/$(IMAGE_PROJECT).amd64.tzst
|
||||||
|
IMAGE_ARM64V8_DOCKERFILE := $(DISTDIR)/Dockerfile.arm64v8
|
||||||
|
IMAGE_ARM64V8_TARBALL := $(DISTDIR)/$(IMAGE_PROJECT).arm64v8.tzst
|
||||||
|
|
||||||
|
export DOCKER_BUILDKIT := 1
|
||||||
|
export BUILDKIT_PROGRESS := plain
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
## "all" target
|
## "all" target
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: save-image
|
all: save-native-image
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
## "build-*" targets
|
## "build-*" targets
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
.PHONY: build-image
|
.PHONY: build-native-image
|
||||||
build-image:
|
build-native-image: $(IMAGE_NATIVE_DOCKERFILE)
|
||||||
'$(DOCKER)' build \
|
|
||||||
|
$(IMAGE_NATIVE_DOCKERFILE): $(DOCKERFILE_TEMPLATE)
|
||||||
|
mkdir -p '$(DISTDIR)'
|
||||||
|
'$(M4)' \
|
||||||
|
--prefix-builtins \
|
||||||
|
'$(DOCKERFILE_TEMPLATE)' > '$@'
|
||||||
|
'$(DOCKER)' build $(IMAGE_BUILD_OPTS) \
|
||||||
--tag '$(IMAGE_NAME):$(IMAGE_VERSION)' \
|
--tag '$(IMAGE_NAME):$(IMAGE_VERSION)' \
|
||||||
--tag '$(IMAGE_NAME):latest' \
|
--tag '$(IMAGE_NAME):latest' \
|
||||||
--file '$(DOCKERFILE)' ./
|
--file '$@' ./
|
||||||
|
|
||||||
|
.PHONY: build-cross-images
|
||||||
|
build-cross-images: build-amd64-image build-arm64v8-image
|
||||||
|
|
||||||
|
.PHONY: build-amd64-image
|
||||||
|
build-amd64-image: $(IMAGE_AMD64_DOCKERFILE)
|
||||||
|
|
||||||
|
$(IMAGE_AMD64_DOCKERFILE): $(DOCKERFILE_TEMPLATE)
|
||||||
|
mkdir -p '$(DISTDIR)'
|
||||||
|
'$(M4)' \
|
||||||
|
--prefix-builtins \
|
||||||
|
--define=CROSS_ARCH=amd64 \
|
||||||
|
'$(DOCKERFILE_TEMPLATE)' > '$@'
|
||||||
|
'$(DOCKER)' build $(IMAGE_BUILD_OPTS) \
|
||||||
|
--tag '$(IMAGE_NAME):$(IMAGE_VERSION)-amd64' \
|
||||||
|
--tag '$(IMAGE_NAME):latest-amd64' \
|
||||||
|
--platform linux/amd64 \
|
||||||
|
--file '$@' ./
|
||||||
|
|
||||||
|
.PHONY: build-arm64v8-image
|
||||||
|
build-arm64v8-image: $(IMAGE_ARM64V8_DOCKERFILE)
|
||||||
|
|
||||||
|
$(IMAGE_ARM64V8_DOCKERFILE): $(DOCKERFILE_TEMPLATE)
|
||||||
|
mkdir -p '$(DISTDIR)'
|
||||||
|
'$(M4)' \
|
||||||
|
--prefix-builtins \
|
||||||
|
--define=CROSS_ARCH=arm64v8 \
|
||||||
|
'$(DOCKERFILE_TEMPLATE)' > '$@'
|
||||||
|
'$(DOCKER)' build $(IMAGE_BUILD_OPTS) \
|
||||||
|
--tag '$(IMAGE_NAME):$(IMAGE_VERSION)-arm64v8' \
|
||||||
|
--tag '$(IMAGE_NAME):latest-arm64v8' \
|
||||||
|
--platform linux/arm64/v8 \
|
||||||
|
--file '$@' ./
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
## "save-*" targets
|
## "save-*" targets
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
define save_image
|
define save_image
|
||||||
'$(DOCKER)' save '$(1)' | xz -T0 > '$(2)'
|
'$(DOCKER)' save '$(1)' | zstd -T0 > '$(2)'
|
||||||
endef
|
endef
|
||||||
|
|
||||||
.PHONY: save-image
|
.PHONY: save-native-image
|
||||||
save-image: $(IMAGE_TARBALL)
|
save-native-image: $(IMAGE_NATIVE_TARBALL)
|
||||||
|
|
||||||
$(IMAGE_TARBALL): build-image
|
$(IMAGE_NATIVE_TARBALL): $(IMAGE_NATIVE_DOCKERFILE)
|
||||||
mkdir -p '$(DISTDIR)'
|
|
||||||
$(call save_image,$(IMAGE_NAME):$(IMAGE_VERSION),$@)
|
$(call save_image,$(IMAGE_NAME):$(IMAGE_VERSION),$@)
|
||||||
|
|
||||||
|
.PHONY: save-cross-images
|
||||||
|
save-cross-images: save-amd64-image save-arm64v8-image
|
||||||
|
|
||||||
|
.PHONY: save-amd64-image
|
||||||
|
save-amd64-image: $(IMAGE_AMD64_TARBALL)
|
||||||
|
|
||||||
|
$(IMAGE_AMD64_TARBALL): $(IMAGE_AMD64_DOCKERFILE)
|
||||||
|
$(call save_image,$(IMAGE_NAME):$(IMAGE_VERSION)-amd64,$@)
|
||||||
|
|
||||||
|
.PHONY: save-arm64v8-image
|
||||||
|
save-arm64v8-image: $(IMAGE_ARM64V8_TARBALL)
|
||||||
|
|
||||||
|
$(IMAGE_ARM64V8_TARBALL): $(IMAGE_ARM64V8_DOCKERFILE)
|
||||||
|
$(call save_image,$(IMAGE_NAME):$(IMAGE_VERSION)-arm64v8,$@)
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
## "load-*" targets
|
## "load-*" targets
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
define load_image
|
define load_image
|
||||||
'$(DOCKER)' load -i '$(1)'
|
zstd -dc '$(1)' | '$(DOCKER)' load
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define tag_image
|
define tag_image
|
||||||
'$(DOCKER)' tag '$(1)' '$(2)'
|
'$(DOCKER)' tag '$(1)' '$(2)'
|
||||||
endef
|
endef
|
||||||
|
|
||||||
.PHONY: load-image
|
.PHONY: load-native-image
|
||||||
load-image:
|
load-native-image:
|
||||||
$(call load_image,$(IMAGE_TARBALL))
|
$(call load_image,$(IMAGE_NATIVE_TARBALL))
|
||||||
$(call tag_image,$(IMAGE_NAME):$(IMAGE_VERSION),$(IMAGE_NAME):latest)
|
$(call tag_image,$(IMAGE_NAME):$(IMAGE_VERSION),$(IMAGE_NAME):latest)
|
||||||
|
|
||||||
|
.PHONY: load-cross-images
|
||||||
|
load-cross-images: load-amd64-image load-arm64v8-image
|
||||||
|
|
||||||
|
.PHONY: load-amd64-image
|
||||||
|
load-amd64-image:
|
||||||
|
$(call load_image,$(IMAGE_AMD64_TARBALL))
|
||||||
|
$(call tag_image,$(IMAGE_NAME):$(IMAGE_VERSION)-amd64,$(IMAGE_NAME):latest-amd64)
|
||||||
|
|
||||||
|
.PHONY: load-arm64v8-image
|
||||||
|
load-arm64v8-image:
|
||||||
|
$(call load_image,$(IMAGE_ARM64V8_TARBALL))
|
||||||
|
$(call tag_image,$(IMAGE_NAME):$(IMAGE_VERSION)-arm64v8,$(IMAGE_NAME):latest-arm64v8)
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
## "push-*" targets
|
## "push-*" targets
|
||||||
##################################################
|
##################################################
|
||||||
@ -80,10 +159,41 @@ define push_image
|
|||||||
'$(DOCKER)' push '$(1)'
|
'$(DOCKER)' push '$(1)'
|
||||||
endef
|
endef
|
||||||
|
|
||||||
.PHONY: push-image
|
define push_cross_manifest
|
||||||
push-image:
|
'$(DOCKER)' manifest create --amend '$(1)' '$(2)-amd64' '$(2)-arm64v8'
|
||||||
$(call push_image,$(IMAGE_NAME):$(IMAGE_VERSION))
|
'$(DOCKER)' manifest annotate '$(1)' '$(2)-amd64' --os linux --arch amd64
|
||||||
$(call push_image,$(IMAGE_NAME):latest)
|
'$(DOCKER)' manifest annotate '$(1)' '$(2)-arm64v8' --os linux --arch arm64 --variant v8
|
||||||
|
'$(DOCKER)' manifest push --purge '$(1)'
|
||||||
|
endef
|
||||||
|
|
||||||
|
.PHONY: push-native-image
|
||||||
|
push-native-image:
|
||||||
|
@printf '%s\n' 'Unimplemented'
|
||||||
|
|
||||||
|
.PHONY: push-cross-images
|
||||||
|
push-cross-images: push-amd64-image push-arm64v8-image
|
||||||
|
|
||||||
|
.PHONY: push-amd64-image
|
||||||
|
push-amd64-image:
|
||||||
|
$(call push_image,$(IMAGE_NAME):$(IMAGE_VERSION)-amd64)
|
||||||
|
$(call push_image,$(IMAGE_NAME):latest-amd64)
|
||||||
|
|
||||||
|
.PHONY: push-arm64v8-image
|
||||||
|
push-arm64v8-image:
|
||||||
|
$(call push_image,$(IMAGE_NAME):$(IMAGE_VERSION)-arm64v8)
|
||||||
|
$(call push_image,$(IMAGE_NAME):latest-arm64v8)
|
||||||
|
|
||||||
|
push-cross-manifest:
|
||||||
|
$(call push_cross_manifest,$(IMAGE_NAME):$(IMAGE_VERSION),$(IMAGE_NAME):$(IMAGE_VERSION))
|
||||||
|
$(call push_cross_manifest,$(IMAGE_NAME):latest,$(IMAGE_NAME):latest)
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
## "binfmt-*" targets
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
.PHONY: binfmt-register
|
||||||
|
binfmt-register:
|
||||||
|
'$(DOCKER)' run --rm --privileged docker.io/hectorm/qemu-user-static:latest --reset --persistent yes --credential yes
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
## "version" target
|
## "version" target
|
||||||
@ -91,13 +201,13 @@ push-image:
|
|||||||
|
|
||||||
.PHONY: version
|
.PHONY: version
|
||||||
version:
|
version:
|
||||||
@if printf -- '%s' '$(IMAGE_VERSION)' | grep -q '^v[0-9]\{1,\}$$'; then \
|
@LATEST_IMAGE_VERSION=$$('$(GIT)' describe --abbrev=0 2>/dev/null || printf 'v0'); \
|
||||||
NEW_IMAGE_VERSION=$$(awk -v 'v=$(IMAGE_VERSION)' 'BEGIN {printf "v%.0f", substr(v,2)+1}'); \
|
if printf '%s' "$${LATEST_IMAGE_VERSION:?}" | grep -q '^v[0-9]\{1,\}$$'; then \
|
||||||
printf -- '%s\n' "$${NEW_IMAGE_VERSION}" > ./VERSION; \
|
NEW_IMAGE_VERSION=$$(awk -v v="$${LATEST_IMAGE_VERSION:?}" 'BEGIN {printf("v%.0f", substr(v,2)+1)}'); \
|
||||||
'$(GIT)' add ./VERSION; '$(GIT)' commit -m "$${NEW_IMAGE_VERSION}"; \
|
'$(GIT)' commit --allow-empty -m "$${NEW_IMAGE_VERSION:?}"; \
|
||||||
'$(GIT)' tag -a "$${NEW_IMAGE_VERSION}" -m "$${NEW_IMAGE_VERSION}"; \
|
'$(GIT)' tag -a "$${NEW_IMAGE_VERSION:?}" -m "$${NEW_IMAGE_VERSION:?}"; \
|
||||||
else \
|
else \
|
||||||
>&2 printf -- 'Malformed version string: %s\n' '$(IMAGE_VERSION)'; \
|
>&2 printf 'Malformed version string: %s\n' "$${LATEST_IMAGE_VERSION:?}"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -107,5 +217,6 @@ version:
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f '$(IMAGE_TARBALL)'
|
rm -f '$(IMAGE_NATIVE_DOCKERFILE)' '$(IMAGE_AMD64_DOCKERFILE)' '$(IMAGE_ARM64V8_DOCKERFILE)'
|
||||||
|
rm -f '$(IMAGE_NATIVE_TARBALL)' '$(IMAGE_AMD64_TARBALL)' '$(IMAGE_ARM64V8_TARBALL)'
|
||||||
if [ -d '$(DISTDIR)' ] && [ -z "$$(ls -A '$(DISTDIR)')" ]; then rmdir '$(DISTDIR)'; fi
|
if [ -d '$(DISTDIR)' ] && [ -z "$$(ls -A '$(DISTDIR)')" ]; then rmdir '$(DISTDIR)'; fi
|
||||||
|
43
README.md
43
README.md
@ -6,41 +6,34 @@ A Docker image for the [ReactOS](https://www.reactos.org) operating system.
|
|||||||
```sh
|
```sh
|
||||||
docker run --detach \
|
docker run --detach \
|
||||||
--name qemu-reactos \
|
--name qemu-reactos \
|
||||||
--restart on-failure:3 \
|
--device /dev/kvm \
|
||||||
|
--publish 127.0.0.1:5900:5900/tcp \
|
||||||
--publish 127.0.0.1:6080:6080/tcp \
|
--publish 127.0.0.1:6080:6080/tcp \
|
||||||
--privileged --env QEMU_KVM=true \
|
--mount type=volume,src=qemu-reactos-disk,dst=/var/lib/qemu/disk/ \
|
||||||
hectormolinero/qemu-reactos:latest
|
docker.io/hectorm/qemu-reactos:latest
|
||||||
```
|
```
|
||||||
> The instance will be available through a web browser from: http://localhost:6080/vnc.html
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The `--device /dev/kvm` option can only be used on Linux hosts, it can be removed on Windows and macOS hosts at a significant performance penalty.
|
||||||
|
|
||||||
|
The instance can be accessed from:
|
||||||
|
* **VNC** (`5900/TCP`), without password.
|
||||||
|
* **noVNC** (`6080/TCP`), http://127.0.0.1:6080/vnc.html
|
||||||
|
* `docker exec -it qemu-reactos vmshell`
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
#### `QEMU_CPU`
|
#### `VM_CPU`
|
||||||
Number of cores the VM is permitted to use (`2` by default).
|
Number of cores the VM is permitted to use (`2` by default).
|
||||||
|
|
||||||
#### `QEMU_RAM`
|
#### `VM_RAM`
|
||||||
Amount of memory the VM is permitted to use (`1024M` by default).
|
Amount of memory the VM is permitted to use (`1024M` by default).
|
||||||
|
|
||||||
#### `QEMU_DISK_SIZE`
|
#### `VM_KEYBOARD`
|
||||||
VM disk size (`16G` by default).
|
|
||||||
|
|
||||||
#### `QEMU_DISK_FORMAT`
|
|
||||||
VM disk format (`qcow2` by default).
|
|
||||||
|
|
||||||
#### `QEMU_KEYBOARD`
|
|
||||||
VM keyboard layout (`en-us` by default).
|
VM keyboard layout (`en-us` by default).
|
||||||
|
|
||||||
#### `QEMU_NET_DEVICE`
|
#### `VM_KVM`
|
||||||
VM network device (`rtl8139` by default).
|
Start QEMU in KVM mode (`true` by default).
|
||||||
|
> The `--device /dev/kvm` option is required for this variable to take effect.
|
||||||
#### `QEMU_BOOT_ORDER`
|
|
||||||
VM boot order (`cd` by default).
|
|
||||||
|
|
||||||
#### `QEMU_BOOT_MENU`
|
|
||||||
VM boot menu (`off` by default).
|
|
||||||
|
|
||||||
#### `QEMU_KVM`
|
|
||||||
Start QEMU in KVM mode (`false` by default).
|
|
||||||
> The `--privileged` option is required to use KVM in the container.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
See the [license](LICENSE.md) file.
|
See the [license](LICENSE.md) file.
|
||||||
|
17
config/samba/smb.conf
Normal file
17
config/samba/smb.conf
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[global]
|
||||||
|
server role = standalone server
|
||||||
|
interfaces = 127.0.0.1
|
||||||
|
bind interfaces only = yes
|
||||||
|
server min protocol = NT1
|
||||||
|
workgroup = WORKGROUP
|
||||||
|
security = user
|
||||||
|
map to guest = Bad User
|
||||||
|
disable netbios = yes
|
||||||
|
disable spoolss = yes
|
||||||
|
usershare max shares = 0
|
||||||
|
|
||||||
|
[share]
|
||||||
|
path = /mnt/
|
||||||
|
read only = no
|
||||||
|
guest ok = yes
|
||||||
|
force user = root
|
33
data/iso/reactos/unattend.bat
Normal file
33
data/iso/reactos/unattend.bat
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
:: Install srvany-ng
|
||||||
|
copy "D:\reactos\3rdParty\srvany-ng.exe" "%SystemRoot%\bin\srvany-ng.exe"
|
||||||
|
|
||||||
|
:: Install ncat
|
||||||
|
copy "D:\reactos\3rdParty\ncat.exe" "%SystemRoot%\bin\ncat.exe"
|
||||||
|
|
||||||
|
:: Install Samba
|
||||||
|
copy "D:\reactos\3rdParty\samba.exe" "%SystemRoot%\bin\samba.exe"
|
||||||
|
"%SystemRoot%\bin\samba.exe" -s
|
||||||
|
|
||||||
|
:: Install BusyBox
|
||||||
|
copy "D:\reactos\3rdParty\busybox.exe" "%SystemRoot%\bin\busybox.exe"
|
||||||
|
|
||||||
|
:: Enable BindShell
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell"
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell" /v DisplayName /t REG_SZ /d "BindShell" /f
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell" /v Description /t REG_SZ /d "Allows remote access" /f
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell" /v ErrorControl /t REG_DWORD /d 1 /f
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell" /v ImagePath /t REG_EXPAND_SZ /d "srvany-ng.exe" /f
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell" /v ObjectName /t REG_SZ /d "LocalSystem" /f
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell" /v Start /t REG_DWORD /d 2 /f
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell" /v Type /t REG_DWORD /d 16 /f
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell\Parameters"
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell\Parameters" /v Application /t REG_SZ /d "%SystemRoot%\bin\ncat.exe" /f
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell\Parameters" /v AppParameters /t REG_SZ /d "-l -k -n -e \"cmd.exe /c (cmd.exe 2^>^&1)\" 51" /f
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BindShell\Parameters" /v AppDirectory /t REG_SZ /d "%SystemDrive%\\" /f
|
||||||
|
|
||||||
|
:: Set UTF-8 encoding in CMD
|
||||||
|
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor" /v AutoRun /t REG_EXPAND_SZ /d "CHCP 65001" /f
|
||||||
|
|
||||||
|
"%SystemRoot%\system32\shutdown.exe" /s /t 5
|
46
data/iso/reactos/unattend.inf
Normal file
46
data/iso/reactos/unattend.inf
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
[Unattend]
|
||||||
|
Signature = "$ReactOS$"
|
||||||
|
|
||||||
|
UnattendSetupEnabled = yes
|
||||||
|
|
||||||
|
DestinationDiskNumber = 0
|
||||||
|
DestinationPartitionNumber = 1
|
||||||
|
InstallationDirectory = ReactOS
|
||||||
|
AutoPartition = 1
|
||||||
|
FormatPartition = 1
|
||||||
|
; 0: FAT
|
||||||
|
; 1: BtrFS
|
||||||
|
FsType = 0
|
||||||
|
; 0: Skips MBR installation
|
||||||
|
; 1: Install MBR on floppy
|
||||||
|
; 2: Install MBR on hdd
|
||||||
|
MBRInstallType = 2
|
||||||
|
|
||||||
|
FullName = "Owner"
|
||||||
|
OrgName = "Org"
|
||||||
|
ComputerName = "REACTOS"
|
||||||
|
; AdminPassword = "password"
|
||||||
|
|
||||||
|
; TimeZoneIndex lists:
|
||||||
|
; https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912053(v=winembedded.10)
|
||||||
|
TimeZoneIndex = 85
|
||||||
|
DisableAutoDaylightTimeSet = 1
|
||||||
|
|
||||||
|
; LocaleID lists:
|
||||||
|
; https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c
|
||||||
|
LocaleID = 409
|
||||||
|
|
||||||
|
; 0: ReactOS Server
|
||||||
|
; 1: ReactOS Workstation
|
||||||
|
ProductOption = 0
|
||||||
|
|
||||||
|
DisableGeckoInst = no
|
||||||
|
|
||||||
|
[GuiRunOnce]
|
||||||
|
D:\reactos\unattend.bat
|
||||||
|
|
||||||
|
[Display]
|
||||||
|
BitsPerPel = 32
|
||||||
|
XResolution = 1440
|
||||||
|
YResolution = 900
|
||||||
|
VRefresh = 0
|
52
run.sh
52
run.sh
@ -3,42 +3,44 @@
|
|||||||
set -eu
|
set -eu
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
IMAGE_NAMESPACE=hectormolinero
|
DOCKER=$(command -v docker 2>/dev/null)
|
||||||
|
|
||||||
|
IMAGE_REGISTRY=docker.io
|
||||||
|
IMAGE_NAMESPACE=hectorm
|
||||||
IMAGE_PROJECT=qemu-reactos
|
IMAGE_PROJECT=qemu-reactos
|
||||||
IMAGE_TAG=latest
|
IMAGE_TAG=latest
|
||||||
IMAGE_NAME=${IMAGE_NAMESPACE}/${IMAGE_PROJECT}:${IMAGE_TAG}
|
IMAGE_NAME=${IMAGE_REGISTRY:?}/${IMAGE_NAMESPACE:?}/${IMAGE_PROJECT:?}:${IMAGE_TAG:?}
|
||||||
CONTAINER_NAME=${IMAGE_PROJECT}
|
CONTAINER_NAME=${IMAGE_PROJECT:?}
|
||||||
|
|
||||||
imageExists() { [ -n "$(docker images -q "$1")" ]; }
|
imageExists() { [ -n "$("${DOCKER:?}" images -q "${1:?}")" ]; }
|
||||||
containerExists() { docker ps -aqf name="$1" --format '{{.Names}}' | grep -Fxq "$1"; }
|
containerExists() { "${DOCKER:?}" ps -af name="${1:?}" --format '{{.Names}}' | grep -Fxq "${1:?}"; }
|
||||||
containerIsRunning() { docker ps -qf name="$1" --format '{{.Names}}' | grep -Fxq "$1"; }
|
containerIsRunning() { "${DOCKER:?}" ps -f name="${1:?}" --format '{{.Names}}' | grep -Fxq "${1:?}"; }
|
||||||
|
|
||||||
if ! imageExists "${IMAGE_NAME}"; then
|
if ! imageExists "${IMAGE_NAME:?}" && ! imageExists "${IMAGE_NAME#docker.io/}"; then
|
||||||
>&2 printf -- '%s\n' "\"${IMAGE_NAME}\" image doesn't exist!"
|
>&2 printf '%s\n' "\"${IMAGE_NAME:?}\" image doesn't exist!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if containerIsRunning "${CONTAINER_NAME}"; then
|
if containerIsRunning "${CONTAINER_NAME:?}"; then
|
||||||
printf -- '%s\n' "Stopping \"${CONTAINER_NAME}\" container..."
|
printf '%s\n' "Stopping \"${CONTAINER_NAME:?}\" container..."
|
||||||
docker stop "${CONTAINER_NAME}" >/dev/null
|
"${DOCKER:?}" stop "${CONTAINER_NAME:?}" >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if containerExists "${CONTAINER_NAME}"; then
|
if containerExists "${CONTAINER_NAME:?}"; then
|
||||||
printf -- '%s\n' "Removing \"${CONTAINER_NAME}\" container..."
|
printf '%s\n' "Removing \"${CONTAINER_NAME:?}\" container..."
|
||||||
docker rm "${CONTAINER_NAME}" >/dev/null
|
"${DOCKER:?}" rm "${CONTAINER_NAME:?}" >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf -- '%s\n' "Creating \"${CONTAINER_NAME}\" container..."
|
printf '%s\n' "Creating \"${CONTAINER_NAME:?}\" container..."
|
||||||
docker run --detach \
|
"${DOCKER:?}" run --detach \
|
||||||
--name "${CONTAINER_NAME}" \
|
--name "${CONTAINER_NAME:?}" \
|
||||||
--hostname "${CONTAINER_NAME}" \
|
--hostname "${CONTAINER_NAME:?}" \
|
||||||
--restart on-failure:3 \
|
--restart on-failure:3 \
|
||||||
--log-opt max-size=32m \
|
--log-opt max-size=32m \
|
||||||
--publish '127.0.0.1:5900:5900/tcp' \
|
--device /dev/kvm \
|
||||||
--publish '127.0.0.1:6080:6080/tcp' \
|
--publish 127.0.0.1:5900:5900/tcp \
|
||||||
--publish '127.0.0.1:15900:15900/tcp' \
|
--publish 127.0.0.1:6080:6080/tcp \
|
||||||
--privileged --env QEMU_KVM=true \
|
"${IMAGE_NAME:?}" "$@" >/dev/null
|
||||||
"${IMAGE_NAME}" "$@" >/dev/null
|
|
||||||
|
|
||||||
printf -- '%s\n\n' 'Done!'
|
printf '%s\n\n' 'Done!'
|
||||||
exec docker logs -f "${CONTAINER_NAME}"
|
exec "${DOCKER:?}" logs -f "${CONTAINER_NAME:?}"
|
||||||
|
17
scripts/bin/container-init
Executable file
17
scripts/bin/container-init
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
for s in "${SVDIR:?}"/*; do sv force-stop "${s:?}" >/dev/null 2>&1; done
|
||||||
|
kill -HUP "${RUNSVDIRPID:?}"; wait "${RUNSVDIRPID:?}"
|
||||||
|
}
|
||||||
|
trap stop EXIT TERM INT HUP
|
||||||
|
|
||||||
|
if [ "$#" -gt 0 ] || [ -t 0 ] || [ -t 1 ]; then
|
||||||
|
runsvdir -P "${SVDIR:?}" >/dev/null 2>&1 & RUNSVDIRPID=$!
|
||||||
|
"$@"
|
||||||
|
else
|
||||||
|
runsvdir -P "${SVDIR:?}" & RUNSVDIRPID=$!
|
||||||
|
wait "${RUNSVDIRPID:?}"
|
||||||
|
fi
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
# Create ReactOS disk
|
|
||||||
if [ ! -f /var/lib/qemu/images/reactos.img ]; then
|
|
||||||
qemu-img create -f "${QEMU_DISK_FORMAT}" /var/lib/qemu/images/reactos.img "${QEMU_DISK_SIZE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start all services
|
|
||||||
exec runsvdir -P /etc/service/
|
|
12
scripts/bin/vmshell
Executable file
12
scripts/bin/vmshell
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# Wait until bind shell is available
|
||||||
|
until printf 'exit\n' | nc 127.0.0.1 5151 >/dev/null 2>&1; do sleep 1; done; sleep 1
|
||||||
|
|
||||||
|
if [ -t 0 ] || [ -t 1 ]; then
|
||||||
|
exec rlwrap nc 127.0.0.1 5151
|
||||||
|
else
|
||||||
|
exec nc 127.0.0.1 5151
|
||||||
|
fi
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
cd ~/
|
cd /opt/novnc/utils/websockify/
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
exec /usr/share/novnc/utils/launch.sh --listen 6080 --vnc localhost:5900
|
exec /usr/bin/python3 -m websockify --web /opt/novnc/ 6080 127.0.0.1:5900
|
||||||
|
5
scripts/service/qemu/control/t
Executable file
5
scripts/service/qemu/control/t
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
printf '%s\n' 'system_powerdown' | nc -w 1 -U /run/qemu-monitor
|
@ -2,17 +2,38 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
QEMU=$(command -v qemu-system-x86_64)
|
set --
|
||||||
QEMU_ARGS="${QEMU_ARGS-} -smp ${QEMU_CPU} -m ${QEMU_RAM}"
|
set -- "$@" -machine pc -smp "${VM_CPU:?}" -m "${VM_RAM:?}"
|
||||||
QEMU_ARGS="${QEMU_ARGS-} -vga std -display vnc=:0"
|
set -- "$@" -device VGA -display vnc=:0 -serial stdio -monitor unix:/run/qemu-monitor,server,nowait
|
||||||
QEMU_ARGS="${QEMU_ARGS-} -drive file=/var/lib/qemu/images/reactos.img,index=0,media=disk,format=${QEMU_DISK_FORMAT}"
|
set -- "$@" -device e1000,netdev=n0 -netdev user,id=n0,ipv4=on,ipv6=off,net=10.0.2.0/24,host=10.0.2.2,dns=10.0.2.3,dhcpstart=10.0.2.15,hostfwd=tcp::2323-:23,hostfwd=tcp::5151-:51,hostfwd=tcp::3389-:3389,"${VM_NET_EXTRA_OPTIONS?}"
|
||||||
QEMU_ARGS="${QEMU_ARGS-} -drive file=/var/lib/qemu/iso/reactos.iso,index=2,media=cdrom,format=raw"
|
set -- "$@" -device ide-hd,id=disk0,bus=ide.0,drive=disk0 -blockdev driver=qcow2,node-name=disk0,file.driver=file,file.filename=/var/lib/qemu/disk/reactos.qcow2
|
||||||
QEMU_ARGS="${QEMU_ARGS-} -boot order=${QEMU_BOOT_ORDER},menu=${QEMU_BOOT_MENU},splash-time=5000"
|
set -- "$@" -usb -device usb-tablet
|
||||||
QEMU_ARGS="${QEMU_ARGS-} -netdev user,id=n0,${QEMU_NET_OPTIONS} -device ${QEMU_NET_DEVICE},netdev=n0"
|
set -- "$@" -k "${VM_KEYBOARD:?}"
|
||||||
QEMU_ARGS="${QEMU_ARGS-} -usb -device usb-tablet"
|
|
||||||
QEMU_ARGS="${QEMU_ARGS-} -k ${QEMU_KEYBOARD}"
|
|
||||||
if [ "${QEMU_KVM}" = true ]; then QEMU_ARGS="${QEMU_ARGS-} -enable-kvm"; fi
|
|
||||||
|
|
||||||
cd ~/
|
if [ "${VM_KVM:?}" = true ] && [ -c /dev/kvm ]; then
|
||||||
|
set -- "$@" -accel kvm -cpu host
|
||||||
|
else
|
||||||
|
set -- "$@" -accel tcg
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd_i=0
|
||||||
|
for cd in /var/lib/qemu/cd/*; do
|
||||||
|
[ -f "${cd:?}" ] || continue
|
||||||
|
set -- "$@" -device ide-cd,id=cd"${cd_i:?}",bus=ide.1,drive=cd"${cd_i:?}" -blockdev driver=raw,node-name=cd"${cd_i:?}",file.driver=file,file.filename="${cd:?}",read-only=on
|
||||||
|
cd_i="$((cd_i + 1))"
|
||||||
|
done
|
||||||
|
|
||||||
|
floppy_i=0
|
||||||
|
for floppy in /var/lib/qemu/floppy/*; do
|
||||||
|
[ -f "${floppy:?}" ] || continue
|
||||||
|
set -- "$@" -device floppy,id=floppy"${floppy_i:?}",bus=floppy-bus.0,drive=floppy"${floppy_i:?}" -blockdev driver=raw,node-name=floppy"${floppy_i:?}",file.driver=file,file.filename="${floppy:?}",read-only=on
|
||||||
|
floppy_i="$((floppy_i + 1))"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "${cd_i:?}" -gt 0 ]; then
|
||||||
|
set -- "$@" -boot order=dc,menu=on,splash-time=5000
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd /var/lib/qemu/
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
exec "${QEMU}" ${QEMU_ARGS}
|
exec /usr/bin/qemu-system-x86_64 "$@"
|
||||||
|
11
scripts/service/smbd/run
Executable file
11
scripts/service/smbd/run
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
if [ ! -d /run/samba/ ]; then
|
||||||
|
install -m 755 -o root -g root -d /run/samba/
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd /run/samba/
|
||||||
|
exec 2>&1
|
||||||
|
exec /usr/sbin/smbd --foreground --debug-stdout --debuglevel=3
|
Loading…
Reference in New Issue
Block a user