| 1 |
# Copyright 2016 The Shaderc 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 |
|
| 15 |
FROM alpine |
| 16 |
|
| 17 |
MAINTAINER Google Shaderc Team |
| 18 |
|
| 19 |
RUN apk add --update \ |
| 20 |
build-base \ |
| 21 |
cmake \ |
| 22 |
git \ |
| 23 |
linux-headers \ |
| 24 |
ninja \ |
| 25 |
python3 \ |
| 26 |
py-pip \ |
| 27 |
&& rm -rf /var/cache/apk/* |
| 28 |
|
| 29 |
WORKDIR /root |
| 30 |
RUN git clone https://github.com/google/shaderc |
| 31 |
|
| 32 |
WORKDIR shaderc |
| 33 |
RUN ./utils/git-sync-deps |
| 34 |
|
| 35 |
WORKDIR build |
| 36 |
RUN cmake -GNinja \ |
| 37 |
-DCMAKE_BUILD_TYPE=Release \ |
| 38 |
-DCMAKE_INSTALL_PREFIX=/usr/local \ |
| 39 |
.. \ |
| 40 |
&& ninja install |
| 41 |
|
| 42 |
WORKDIR /root |
| 43 |
RUN rm -rf shaderc |
| 44 |
|
| 45 |
RUN adduser -s /bin/sh -D shaderc |
| 46 |
USER shaderc |
| 47 |
|
| 48 |
VOLUME /code |
| 49 |
WORKDIR /code |
| 50 |
|
| 51 |
CMD ["/bin/sh"] |