forked from microsoft/onefuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (35 loc) · 1.32 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
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Dockerized OneFuzz CLI
FROM mcr.microsoft.com/oss/mirror/docker.io/library/ubuntu:20.04 AS installer-env
# Pull Request that contains OneFuzz release-artifacts
# used to create the Docker container
ARG PR
ARG GITHUB_TOKEN
ARG REPO="microsoft/onefuzz"
ENV GITHUB_ISSUE_TOKEN=${GITHUB_TOKEN}
RUN apt-get update && \
apt-get install --yes --quiet curl \
unzip \
python3 \
python3-pip \
wget \
&& \
pip3 install PyGithub && \
mkdir onefuzz-prep
RUN wget https://aka.ms/downloadazcopy-v10-linux && \
tar -xvf downloadazcopy-v10-linux
COPY "./utils/check-pr/github_client.py" "/onefuzz-prep"
RUN python3 /onefuzz-prep/github_client.py --destination /onefuzz-prep/ --pr ${PR} --repo ${REPO} && \
unzip /onefuzz-prep/release-artifacts.zip -d /onefuzz-prep
FROM mcr.microsoft.com/oss/mirror/docker.io/library/ubuntu:20.04
COPY --from=installer-env ["/onefuzz-prep/sdk", "/onefuzz-sdk"]
COPY --from=installer-env ["/azcopy_linux_amd64_*/azcopy", "/usr/bin"]
RUN apt-get update && \
apt-get install --yes --quiet \
python3 \
python3-pip \
python-is-python3
RUN pip install /onefuzz-sdk/onefuzztypes-*.whl && \
pip install /onefuzz-sdk/onefuzz-*.whl
CMD onefuzz --help && /bin/bash