2019-10-16 20:33:43 +00:00
|
|
|
# Copyright 2019 Google Inc.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-08-30 18:47:04 +00:00
|
|
|
FROM gcr.io/oss-fuzz-base/base-builder-rust
|
2019-10-16 20:33:43 +00:00
|
|
|
|
2021-05-27 19:06:33 +00:00
|
|
|
RUN apt-get --yes update \
|
|
|
|
&& apt-get install --no-install-recommends --yes \
|
|
|
|
libssl-dev \
|
|
|
|
pkg-config \
|
2021-08-20 16:08:43 +00:00
|
|
|
python \
|
2021-05-27 19:06:33 +00:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm --recursive --force /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# Install WebAssembly target for Rust.
|
|
|
|
RUN rustup target add wasm32-unknown-unknown
|
|
|
|
|
2021-05-20 09:50:24 +00:00
|
|
|
# Install Protobuf compiler.
|
|
|
|
ARG protobuf_version=3.13.0
|
|
|
|
ARG protobuf_sha256=4a3b26d1ebb9c1d23e933694a6669295f6a39ddc64c3db2adf671f0a6026f82e
|
|
|
|
ARG protobuf_dir=/usr/local/protobuf
|
|
|
|
ARG protobuf_temp=/tmp/protobuf.zip
|
|
|
|
ENV PATH "${protobuf_dir}/bin:${PATH}"
|
|
|
|
RUN curl --location https://github.com/protocolbuffers/protobuf/releases/download/v${protobuf_version}/protoc-${protobuf_version}-linux-x86_64.zip > ${protobuf_temp} \
|
|
|
|
&& sha256sum --binary ${protobuf_temp} && echo "${protobuf_sha256} *${protobuf_temp}" | sha256sum --check \
|
|
|
|
&& unzip ${protobuf_temp} -d ${protobuf_dir} \
|
|
|
|
&& rm ${protobuf_temp} \
|
|
|
|
&& chmod --recursive a+rwx ${protobuf_dir} \
|
|
|
|
&& protoc --version
|
|
|
|
|
2019-10-16 20:33:43 +00:00
|
|
|
RUN git clone --depth 1 https://github.com/project-oak/oak oak
|
2021-05-25 14:36:20 +00:00
|
|
|
|
2019-10-16 20:33:43 +00:00
|
|
|
WORKDIR oak
|
|
|
|
COPY build.sh $SRC/
|
2021-05-10 16:34:25 +00:00
|
|
|
COPY rustc.py $SRC/
|