1# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements.  See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership.  The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License.  You may obtain a copy of the License at
8#
9#   http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied.  See the License for the
15# specific language governing permissions and limitations
16# under the License.
17
18FROM ubuntu:22.04
19MAINTAINER Teaclave Contributors <dev@teaclave.apache.org>
20ENV DEBIAN_FRONTEND=noninteractive
21
22# Install dependencies for building OP-TEE
23RUN apt-get update && \
24    apt-get install -y \
25    git \
26    android-tools-adb \
27    android-tools-fastboot \
28    autoconf \
29    automake \
30    bc \
31    bison \
32    build-essential \
33    ccache \
34    cscope \
35    curl \
36    device-tree-compiler \
37    expect \
38    flex \
39    ftp-upload \
40    gcc-aarch64-linux-gnu \
41    gcc-arm-linux-gnueabihf \
42    gdisk \
43    iasl \
44    libattr1-dev \
45    libcap-dev \
46    libfdt-dev \
47    libftdi-dev \
48    libglib2.0-dev \
49    libgmp-dev \
50    libhidapi-dev \
51    libmpc-dev \
52    libncurses5-dev \
53    libpixman-1-dev \
54    libssl-dev \
55    libtool \
56    make \
57    mtools \
58    netcat \
59    ninja-build \
60    python \
61    python-crypto \
62    python3-crypto \
63    python-pyelftools \
64    python3-pycryptodome \
65    python3-pyelftools \
66    python3-serial \
67    rsync \
68    unzip \
69    uuid-dev \
70    xdg-utils \
71    xterm \
72    xz-utils \
73    zlib1g-dev \
74    wget \
75    cpio \
76    libcap-ng-dev \
77    screen \
78    libvdeplug-dev \
79    libsdl2-dev \
80    pip \
81    ca-certificates
82
83RUN pip install cryptography
84
85RUN apt-get install -y software-properties-common && \
86    add-apt-repository ppa:linuxuprising/libpng12 && \
87    apt-get update && \
88    apt-get install libpng12-0
89
90# Install Rust
91RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
92  . $HOME/.cargo/env && \
93  rustup target install aarch64-unknown-linux-gnu && \
94  rustup default nightly-2023-12-18
95
96ENV PATH="/root/.cargo/bin:$PATH"
97