Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0be1b1f87e | ||
|
|
4baa03af98 | ||
|
|
a34955c023 | ||
|
|
b30c665286 | ||
|
|
102c2f2604 | ||
|
|
a96c167554 | ||
|
|
b0072dcd28 | ||
|
|
abca055a1e | ||
|
|
a12870ff77 | ||
|
|
eb48abe681 | ||
|
|
3cf63e4871 | ||
|
|
4905f14e64 | ||
|
|
eaf9927902 |
No files matched your search
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up QEMU-action
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
@@ -13,10 +13,10 @@ jobs:
|
||||
dockerhubdescription:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Update Docker Hub description
|
||||
uses: peter-evans/dockerhub-description@v4
|
||||
uses: peter-evans/dockerhub-description@v5
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
+41
-6
@@ -1,5 +1,5 @@
|
||||
# builder container
|
||||
FROM node:20-bullseye as build
|
||||
# Xen Orchestra builder container
|
||||
FROM node:24-trixie as xo-build
|
||||
|
||||
# Install set of dependencies to support building Xen Orchestra
|
||||
RUN apt update && \
|
||||
@@ -20,20 +20,55 @@ RUN yarn config set network-timeout 200000 && yarn && yarn build
|
||||
# Install plugins
|
||||
RUN find /etc/xen-orchestra/packages/ -maxdepth 1 -mindepth 1 -not -name "xo-server" -not -name "xo-web" -not -name "xo-server-cloud" -not -name "xo-server-test" -not -name "xo-server-test-plugin" -exec ln -s {} /etc/xen-orchestra/packages/xo-server/node_modules \;
|
||||
|
||||
# libnbd / nbdkit builder container
|
||||
FROM debian:trixie as nbd-build
|
||||
|
||||
# Install set of dependencies for building libnbd and nbdkit
|
||||
RUN apt update && \
|
||||
apt install -y git dh-autoreconf pkg-config make libxml2-dev ocaml libc-bin
|
||||
|
||||
ARG LIBNBD_REPO=https://gitlab.com/nbdkit/libnbd.git
|
||||
ARG LIBNBD_VERSION=v1.23.4
|
||||
ARG NBDKIT_REPO=https://gitlab.com/nbdkit/nbdkit.git
|
||||
ARG NBDKIT_VERSION=v1.44.3
|
||||
|
||||
# Fetch libnbd and nbdkit sources at their required tags
|
||||
RUN git clone --depth 1 --branch "${LIBNBD_VERSION}" "${LIBNBD_REPO}" /tmp/libnbd && \
|
||||
git clone --depth 1 --branch "${NBDKIT_VERSION}" "${NBDKIT_REPO}" /tmp/nbdkit
|
||||
|
||||
# Build libnbd
|
||||
WORKDIR /tmp/libnbd
|
||||
RUN autoreconf -i && \
|
||||
./configure --prefix=/usr/local && \
|
||||
make -j"$(nproc)" && \
|
||||
make install DESTDIR=/opt/stage/libnbd
|
||||
|
||||
# Build nbdkit
|
||||
WORKDIR /tmp/nbdkit
|
||||
RUN autoreconf -i && \
|
||||
./configure --prefix=/usr/local && \
|
||||
make -j"$(nproc)" && \
|
||||
make install DESTDIR=/opt/stage/nbdkit
|
||||
|
||||
# Runner container
|
||||
FROM node:20-bullseye-slim
|
||||
FROM node:24-trixie-slim
|
||||
|
||||
LABEL org.opencontainers.image.authors="Roni Väyrynen <roni@vayrynen.info>"
|
||||
|
||||
# Install set of dependencies for running Xen Orchestra
|
||||
RUN apt update && \
|
||||
apt install -y redis-server libvhdi-utils python3-minimal python3-jinja2 lvm2 nfs-common netbase cifs-utils ca-certificates monit procps curl ntfs-3g
|
||||
apt install -y redis-server libvhdi-utils libxml2 python3-minimal python3-jinja2 lvm2 libfuse2t64 nfs-common netbase cifs-utils ca-certificates monit procps curl ntfs-3g
|
||||
|
||||
# Install forever for starting/stopping Xen-Orchestra
|
||||
RUN npm install forever -g
|
||||
|
||||
# Copy built xen orchestra from builder
|
||||
COPY --from=build /etc/xen-orchestra /etc/xen-orchestra
|
||||
# Copy built xen orchestra from xo-build container
|
||||
COPY --from=xo-build /etc/xen-orchestra /etc/xen-orchestra
|
||||
|
||||
# Copy built libnbd, nbdkit from nbd-build container and update links using ldconfig
|
||||
COPY --from=nbd-build /opt/stage/libnbd/usr/local /usr/local
|
||||
COPY --from=nbd-build /opt/stage/nbdkit/usr/local /usr/local
|
||||
RUN ldconfig
|
||||
|
||||
# Logging
|
||||
RUN ln -sf /proc/1/fd/1 /var/log/redis/redis-server.log && \
|
||||
|
||||
@@ -44,7 +44,7 @@ Xen-Orchestra is now accessible at http://your-ip-address. Default credentials a
|
||||
- Other than testing, suggested method is to mount data paths from your host to preserve data
|
||||
|
||||
```
|
||||
docker run -itd -p 80:80 -v /path/to/data/xo-server:/var/lib/xo-server -v /path/to/data/redis:/var/lib/redis ronivay/xen-orchestra
|
||||
docker run -itd -p 80:80 -v /path/to/data/xo-server:/var/lib/xo-server -v /path/to/data/redis:/var/lib/redis -v /path/to/data/vddk-lib:/usr/local/lib/vddk ronivay/xen-orchestra
|
||||
```
|
||||
|
||||
I also suggest adding --stop-timeout since there are multiple services inside single container and we want them to shutdown gracefully when container is stopped.
|
||||
@@ -110,6 +110,7 @@ services:
|
||||
volumes:
|
||||
- xo-data:/var/lib/xo-server
|
||||
- redis-data:/var/lib/redis
|
||||
- vddk-lib:/usr/local/lib/vddk
|
||||
# mount certificate files to container if HTTPS is set with cert/key paths
|
||||
#- /path/to/cert.pem:/cert.pem
|
||||
#- /path/to/cert.key:/cert.key
|
||||
@@ -131,6 +132,7 @@ services:
|
||||
volumes:
|
||||
xo-data:
|
||||
redis-data:
|
||||
vddk-lib:
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
@@ -27,6 +27,7 @@ services:
|
||||
volumes:
|
||||
- xo-data:/var/lib/xo-server
|
||||
- redis-data:/var/lib/redis
|
||||
- vddk-lib:/usr/local/lib/vddk
|
||||
# to preserve xo-server config on host dir after generated by container
|
||||
#- /path/to/config:/etc/xo-server
|
||||
# mount certificate files to container if HTTPS is set with cert/key paths
|
||||
@@ -50,3 +51,4 @@ services:
|
||||
volumes:
|
||||
xo-data:
|
||||
redis-data:
|
||||
vddk-lib:
|
||||
Reference in new issue
Block a user