forked from mozilla-services/mozilla-pipeline-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (41 loc) · 1.35 KB
/
Dockerfile
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
# debian bullseye provides rust >= 1.46 needed to build jsonschema-transpiler
# --platform=linux/amd64 added to prevent pulling ARM images when run on Apple Silicon
FROM --platform=linux/amd64 python:3.8-slim-bullseye
LABEL maintainer="Mozilla Data Platform"
# man directory is removed in upstream debian:slim, but needed by jdk install
RUN mkdir -p /usr/share/man/man1 && \
apt-get update -qqy && \
apt-get install -qqy \
cmake \
diffutils \
gcc \
g++ \
jq \
make \
wget \
git \
openjdk-11-jdk-headless \
maven \
cargo
# Install jsonschema-transpiler
ENV PATH=$PATH:/root/.cargo/bin
RUN cargo install jsonschema-transpiler --version 1.9.0
# Configure git for testing
RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Mozilla Pipeline Schemas"
WORKDIR /app
COPY --from=mozilla/ingestion-sink:latest /app/ingestion-sink/target /app/target
# Install python dependencies
COPY requirements.txt requirements-dev.txt ./
RUN pip3 install --upgrade pip setuptools && \
pip3 install -r requirements.txt -r requirements-dev.txt
# Install Java dependencies
COPY pom.xml .
RUN mvn dependency:copy-dependencies
COPY . /app
RUN pip3 install .
RUN mkdir release && \
cd release && \
cmake .. && \
make
CMD pytest -v