blob: 7ffd336407ac99856e354cbe2e16fd9edc59ab04 [file] [log] [blame]
Kaido Kert04cd6fa2021-04-16 11:38:35 -07001# Copyright 2021 The Cobalt Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Kaido Kert308ed6b2020-07-31 13:56:40 -070015FROM cobalt-build-base
16
17RUN apt update -qqy \
18 && apt install -qqy --no-install-recommends \
Kaido Kert308ed6b2020-07-31 13:56:40 -070019 default-jdk \
20 g++-multilib \
Kaido Kert308ed6b2020-07-31 13:56:40 -070021 python-requests \
Kaido Kert308ed6b2020-07-31 13:56:40 -070022 && apt-get clean autoclean \
23 && apt-get autoremove -y --purge \
24 && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
25 && rm -rf /var/lib/{apt,dpkg,cache,log} \
26 && echo "Done"
27
Xiaoming Shi6c3b32a2020-09-21 12:36:58 -070028RUN mkdir -p /root/.android
29
Kaido Kert6c8e6ca2021-04-02 11:12:53 -070030RUN keytool -genkey -v \
31 -keystore /root/.android/debug.keystore \
32 -dname "cn=Android Docker, ou=YouTube, o=Google, c=US" \
33 -storepass android \
34 -alias androiddebugkey \
35 -keypass android \
36 -keyalg RSA \
37 -keysize 2048 \
38 -validity 10000
39
40CMD /code/cobalt/build/gyp_cobalt -v -C ${CONFIG} ${PLATFORM} \
Kaido Kert72bde072021-03-12 15:55:15 -080041 && ninja -v -j ${NINJA_PARALLEL} -C ${OUTDIR}/${PLATFORM}_${CONFIG} ${TARGET:-cobalt_deploy}