File: Containerfile

package info (click to toggle)
slixmpp 1.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,520 kB
  • sloc: python: 41,715; xml: 1,197; makefile: 120
file content (80 lines) | stat: -rw-r--r-- 2,853 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# A container for Woodpecker CI
# This it NOT meant to be used in any other context
FROM debian:trixie-slim AS ci

ENV UV_LINK_MODE=copy
ENV PATH=.venv/bin:$PATH

RUN apt update && apt install cargo gpg git -y && rm -rf /var/lib/apt/lists/*

COPY ./itests/prosody.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates
COPY --from=ghcr.io/astral-sh/uv /uv /uvx /bin/

# install different python versions and populate the pypi cache,
# this way woodpecker does not have to make network calls unless
# we change the dependencies

COPY pyproject.toml uv.lock .

RUN for VER in 3.11 3.12 3.13 3.14; do \
        uv python install $VER ; \
        uv python pin $VER ; \
        uv sync --frozen --all-groups --no-install-project ; \
	done

# Containers used to build wheels
FROM quay.io/pypa/musllinux_1_2_x86_64 AS musllinux-amd64
# preinstall python versions to avoid requiring to fetch them in CI
RUN for VER in 3.11 3.12 3.13 3.14; do \
        uv python install $VER ; \
	done
RUN apk add cargo
RUN mkdir /io
WORKDIR /io

FROM quay.io/pypa/musllinux_1_2_aarch64 AS musllinux-arm64
# for some reason, the old uv of this specific container cannot install python > 3.13
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN mv /root/.local/bin/uv /usr/local/bin/
RUN apk add cargo
# preinstall python versions to avoid requiring to fetch them in CI
RUN for VER in 3.11 3.12 3.13 3.14; do \
        uv python install $VER ; \
	done
RUN mkdir /io
WORKDIR /io

FROM quay.io/pypa/manylinux2014_x86_64 AS manylinux-amd64
# preinstall python versions to avoid requiring to fetch them in CI
RUN for VER in 3.11 3.12 3.13 3.14; do \
        uv python install $VER ; \
	done
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:$PATH"
RUN mkdir /io
WORKDIR /io

FROM quay.io/pypa/manylinux2014_aarch64 AS manylinux-arm64
# preinstall python versions to avoid requiring to fetch them in CI
RUN for VER in 3.11 3.12 3.13 3.14; do \
        uv python install $VER ; \
	done
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:$PATH"
RUN mkdir /io
WORKDIR /io

# Prosody server for integration tests
FROM docker.io/library/alpine:edge as prosody
RUN apk add prosody luarocks openssl
RUN ln -s /usr/bin/luarocks-?.? /usr/bin/luarocks  # luarocks is apparently not packaged correctly in alpine?
COPY ./itests/prosody.cfg.lua /etc/prosody/prosody.cfg.lua
COPY ./itests/prosody.crt ./itests/prosody.key /etc/prosody/certs/
RUN mkdir /var/www && echo "null" > /var/www/status.json
RUN prosodyctl register slix-ci-1 prosody slix-ci-1-pass
RUN prosodyctl register slix-ci-2 prosody slix-ci-2-pass
RUN prosodyctl install --server=https://modules.prosody.im/rocks/ mod_muc_moderation
RUN prosodyctl install --server=https://modules.prosody.im/rocks/ mod_service_outage_status
USER prosody
ENTRYPOINT ["prosody", "-F"]