• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://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, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15FROM ubuntu:19.10
16RUN apt-get update &&\
17    apt-get install -y \
18        libc6-dev \
19        python \
20        git
21
22ENV CIPD_CACHE_DIR /pigweed-cache/cipd-cache-dir
23# This is only for seeding the environment, not meant to be used. Running
24# bootstrap inside another checkout will reset PW_ROOT but leave
25# PW_ENVIRONMENT_ROOT alone.
26ENV PW_ROOT /cache/pigweed
27ENV PW_ENVIRONMENT_ROOT /cache/environment
28
29WORKDIR $PW_ROOT
30# env_setup requires .git for determining top-level directory with git rev-parse
31ENV EMAIL "docker-build <>"
32RUN git init
33RUN git commit --allow-empty --allow-empty-message -m ''
34COPY pw_env_setup/ $PW_ROOT/pw_env_setup/
35# --shell-file is required, but we're going to ignore it.
36RUN $PW_ROOT/pw_env_setup/py/pw_env_setup/env_setup.py \
37    --shell-file $PW_ROOT/init.sh \
38    --pw-root $PW_ROOT \
39    --install-dir $PW_ENVIRONMENT_ROOT
40
41CMD /bin/bash
42