forked from anchore/anchore-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.py3
42 lines (26 loc) · 1.28 KB
/
Dockerfile.py3
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
# Build pip wheels for all dependencies
FROM centos:7 as wheelbuilder
ARG CLI_COMMIT=master
LABEL anchore_cli_commit=$ANCHORE_COMMIT
ENV LANG=en_US.UTF-8
EXPOSE 8228 8338 8087 8082
RUN yum -y update && yum -y install epel-release && yum -y install python34 python34-devel git skopeo python34-pip dpkg psmisc gcc && yum clean all -y
RUN pip3 install --upgrade pip && pip3 install --upgrade setuptools wheel
RUN pip3 install -e git+git://github.com/anchore/anchore-cli.git@$CLI_COMMIT\#egg=anchorecli
COPY . /anchore-engine
WORKDIR /anchore-engine
RUN pip3 wheel --wheel-dir=/wheels -r requirements.txt
# Do the final build
FROM centos:7
ARG CLI_COMMIT=master
LABEL anchore_cli_commit=$ANCHORE_COMMIT
ENV LANG=en_US.UTF-8
EXPOSE 8228 8338 8087 8082
RUN yum -y update && yum -y install epel-release && yum -y install git skopeo python34 python34-tools python34-devel python34-pip dpkg psmisc && yum clean all -y
RUN pip3 install --upgrade pip && pip3 install --upgrade setuptools wheel
RUN pip3 install -e git+git://github.com/anchore/anchore-cli.git@$CLI_COMMIT\#egg=anchorecli
COPY --from=wheelbuilder /wheels /wheels
COPY . /anchore-engine
WORKDIR /anchore-engine
RUN pip3 install --no-index --find-links=/wheels -r requirements.txt && pip3 install .
CMD /usr/bin/anchore-manager service start