mirror of
https://github.com/h2o/h2o.git
synced 2025-05-15 10:43:06 +08:00
96 lines
2.2 KiB
Docker
96 lines
2.2 KiB
Docker
FROM ubuntu:20.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get --yes update
|
|
RUN apt-get install --yes \
|
|
apache2-utils \
|
|
bison \
|
|
clang \
|
|
cmake \
|
|
cmake-data \
|
|
dnsutils \
|
|
flex \
|
|
git \
|
|
libbrotli-dev \
|
|
libc-ares-dev \
|
|
libcap-dev \
|
|
libclang-dev \
|
|
libedit-dev \
|
|
libelf-dev \
|
|
libev-dev \
|
|
libssl-dev \
|
|
libuv1-dev \
|
|
llvm-dev \
|
|
libllvm7 \
|
|
llvm-7-dev \
|
|
libclang-7-dev \
|
|
zlib1g-dev \
|
|
memcached \
|
|
net-tools \
|
|
netcat-openbsd \
|
|
nghttp2-client \
|
|
php-cgi \
|
|
pkgconf \
|
|
python3 \
|
|
python3-distutils \
|
|
redis-server \
|
|
ruby-dev \
|
|
sudo \
|
|
systemtap-sdt-dev \
|
|
time \
|
|
wget
|
|
|
|
# curl with http2 support
|
|
RUN apt-get install --yes libnghttp2-dev \
|
|
&& wget --no-verbose -O - https://curl.haxx.se/download/curl-7.81.0.tar.gz | tar xzf - \
|
|
&& (cd curl-7.81.0 && ./configure --prefix=/usr/local --with-openssl --without-brotli --with-nghttp2 --disable-shared && make && sudo make install)
|
|
|
|
# perl
|
|
RUN apt-get install --yes \
|
|
cpanminus \
|
|
libfcgi-perl \
|
|
libfcgi-procmanager-perl \
|
|
libipc-signal-perl \
|
|
libjson-perl \
|
|
liblist-moreutils-perl \
|
|
libplack-perl \
|
|
libscope-guard-perl \
|
|
libtest-exception-perl \
|
|
libwww-perl \
|
|
libio-socket-ssl-perl
|
|
ENV PERL_CPANM_OPT="--mirror https://cpan.metacpan.org/"
|
|
RUN sudo cpanm --notest Test::More Starlet Protocol::HTTP2
|
|
RUN sudo cpanm --notest Net::DNS::Nameserver
|
|
RUN sudo cpanm --notest https://github.com/tokuhirom/Test-TCP.git@2.21
|
|
|
|
# h2spec
|
|
RUN curl -Ls https://github.com/i110/h2spec/releases/download/v2.2.0-4e8cc7e/h2spec_linux_amd64.tar.gz | tar zx -C /usr/local/bin
|
|
|
|
# bcc and bpftrace
|
|
RUN apt-get install --yes \
|
|
libbpfcc-dev
|
|
RUN git clone --branch kazuho/usdt-attach-all-locations https://github.com/kazuho/bpftrace.git && \
|
|
cd bpftrace && \
|
|
mkdir build && \
|
|
cd build && \
|
|
cmake -DLLVM_REQUESTED_VERSION=7 .. && \
|
|
make && \
|
|
make install && \
|
|
make clean
|
|
|
|
# use dumb-init
|
|
RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 \
|
|
&& chmod +x /usr/local/bin/dumb-init
|
|
|
|
# komake
|
|
RUN wget -O /usr/local/bin/komake https://raw.githubusercontent.com/kazuho/komake/main/komake && chmod +x /usr/local/bin/komake
|
|
|
|
# create user
|
|
RUN useradd --create-home ci
|
|
RUN echo 'ci ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
WORKDIR /home/ci
|
|
USER ci
|
|
|
|
ENTRYPOINT ["/usr/local/bin/dumb-init"]
|