-
-
Notifications
You must be signed in to change notification settings - Fork 365
Expand file tree
/
Copy pathmetadata.Dockerfile
More file actions
58 lines (42 loc) · 1.75 KB
/
metadata.Dockerfile
File metadata and controls
58 lines (42 loc) · 1.75 KB
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
# Everything we need in both the build and prod images
FROM ubuntu:latest AS base
ARG configuration=Debug
# Don't prompt for time zone
ENV DEBIAN_FRONTEND=noninteractive
# Properly handle Unicode
ENV LANG=C.utf-8
# Put user-installed Python code in path
ENV PATH="$PATH:/root/.local/bin"
# Install Git and Python
RUN apt-get update \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
ca-certificates libicu74 git libffi-dev \
python3 python-is-python3
# Trust all git repos
RUN git config --global --add safe.directory '*'
# Isolate Python build stuff in a separate container
FROM base AS build
# Install Python build deps
RUN apt-get install -y --no-install-recommends \
python3-pip python3-setuptools python3-dev
# Install the meta tester's Python code and its Infra dep
ENV PIP_ROOT_USER_ACTION=ignore
ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN pip3 install 'git+https://github.com/KSP-CKAN/NetKAN-Infra#subdirectory=netkan'
RUN pip3 install 'git+https://github.com/KSP-CKAN/xKAN-meta_testing'
# Prune unused deps
RUN pip3 --no-input uninstall -y flask gunicorn werkzeug
# The image we'll actually use
FROM base AS prod
# Purge APT download cache, package lists, and logs
RUN apt-get clean \
&& rm -r /var/lib/apt/lists /var/log/dpkg.log /var/log/apt
# Extract built Python packages from the build image
COPY --from=build /usr/local /usr/local
# Install the config file that tells the meta tester how to run ckan and netkan
ADD Netkan/metadata.ini /usr/local/etc/.
# Install the .NET assemblies the meta tester uses
ADD _build/out/CKAN-CmdLine/${configuration}/bin/net8.0/linux-x64/publish/. /usr/local/bin/.
ADD _build/out/CKAN-NetKAN/${configuration}/bin/net8.0/linux-x64/publish/. /usr/local/bin/.
ENTRYPOINT ["ckanmetatester"]