-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
120 lines (105 loc) · 3.89 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#*****************************************************************
#
# Copyright © 2017-2020 kohnech, lnwhome All rights reserved
#
# mpeg2ts - mpeg2ts Dockerfile
#
# This file is part of mpeg2ts (Mpeg2 Transport Stream Library).
#
# Unless you have obtained mpeg2ts under a different license,
# this version of mpeg2ts is mpeg2ts|GPL.
# Mpeg2ts|GPL is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2,
# or (at your option) any later version.
#
# Mpeg2ts|GPL is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mpeg2ts|GPL; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#******************************************************************/
FROM ubuntu:16.04 as base
### Create user account ###
FROM base as user
RUN apt-get update && apt-get -y --no-install-recommends install \
ca-certificates=20170717~16.04.1 \
curl
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture)" \
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture).asc" \
&& gpg --verify /usr/local/bin/gosu.asc \
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu
### Builder image ###
FROM user as build
RUN apt-get update && apt-get --yes --no-install-recommends install \
apt-utils \
software-properties-common \
build-essential \
tstools \
gdb \
gdbserver \
wget \
lcov \
sudo \
zip \
unzip \
doxygen \
cmake \
openssh-client \
git \
graphviz && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# LLVM Clang
ENV CLANG_VERSION=7
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-$CLANG_VERSION main"
RUN apt-get update
#RUN apt-get install --yes --no-install-recommends clang-$CLANG_VERSION
RUN apt-get install --yes --no-install-recommends clang-tidy-$CLANG_VERSION
RUN apt-get install --yes --no-install-recommends clang-format-$CLANG_VERSION
# python support
RUN apt-get update && apt-get --yes --no-install-recommends install \
python3-setuptools=20.7.0-1 \
virtualenv=15.0.1+ds-3ubuntu1 \
python3-pip=8.1.1-2ubuntu0.4 \
python3-dev=3.5.1-3 \
python3-virtualenv=15.0.1+ds-3ubuntu1 \
python3-pip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
#python packages
RUN pip3 install flake8
# Install latest cppcheck
RUN git clone https://github.com/danmar/cppcheck.git /cppcheck \
&& mkdir /cppcheck/build \
&& cd /cppcheck/build \
&& cmake .. && cmake --build . -- -j16 && make install \
&& cd / && rm -rf /cppcheck
# Install gtest/gmock
RUN git clone -q https://github.com/google/googletest.git /googletest \
&& cd googletest \
&& git checkout tags/release-1.8.1 \
&& mkdir -p /googletest/build \
&& cd /googletest/build \
&& cmake .. && make && make install \
&& cd / && rm -rf /googletest
# Install benchmark
RUN git clone -q https://github.com/google/benchmark.git /benchmark \
&& cd benchmark \
&& git checkout tags/v1.4.0 \
&& mkdir -p /benchmark/build \
&& cd /benchmark/build \
&& cmake -DCMAKE_BUILD_TYPE=Release .. && make && make install \
&& cd / && rm -rf /benchmark
# entrypoint
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
WORKDIR /tmp/workspace