Skip to content

Commit

Permalink
Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pspacek committed Feb 3, 2023
1 parent fd34e07 commit f36350e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG BASE_IMAGE=ubuntu:22.04
FROM $BASE_IMAGE AS runtime_base
MAINTAINER Petr Spacek <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN apt-get upgrade -y -qqq
# dnsperf's runtime depedencies
RUN apt-get install -y -qqq libck0 libnghttp2-14 libldns3

# separate image for build, will not be tagged at the end
FROM runtime_base AS build_stage
RUN apt-get install -y -qqq git build-essential libssl-dev autoconf libtool pkg-config libck-dev libnghttp2-dev libldns-dev
# copy repo as build context
COPY . /dnsperf
WORKDIR /dnsperf
RUN ./autogen.sh
RUN ./configure --prefix=/usr/local
RUN make -j$(nproc)
RUN make install
RUN git log -1 > /usr/local/dnsperf.git.log
RUN git diff > /usr/local/dnsperf.git.diff
RUN git status > /usr/local/dnsperf.git.status

# copy only installed artifacts and throw away everything else
FROM runtime_base AS installed
COPY --from=build_stage /usr/local /usr/local

ENTRYPOINT ["/usr/local/bin/dnsperf"]

0 comments on commit f36350e

Please sign in to comment.