zuul-preview/Dockerfile
Monty Taylor 31d726c6e6 Overhaul warnings, debug and optimize settings
There's a ton of stuff in here that's holdovers from the days of
Drizzle, such as intel c compiler and solaris support, that can
just flat go away. There's also support for being able to turn off
a bunch of various things with m4 parameters that were there to let
us deal with legacy MySQL code. We don't need any of those. We can
also just depend on autoconf archive for more functions and align
with the behavior there rather than carrying local logic.

While we're at it, rename both pandora and zuul prefixed things to
opendev. pandora-build is what we were calling the collection of
autoconf stuff 10 years ago, but is a long-dead project. That said,
none of this is specific to zuul, but might still be useful for
general C++ "I want to build things cleanly and stricly like
Drizzle did". Use opendev for now, with the thought that perhaps
we'll extract these into their own repo to be used by people
should they choose.

Perhaps a better prefix choice would be "DRIZZLE_" - since these
are "build things inspired by Drizzle" - but maybe that implies
a provenance that doesn't exist.

Update copyright for the files that have essentially been rewritten.
For the ones that are still legitimately based on the original code,
add a Red Hat header line.
2019-02-10 17:31:33 +00:00

40 lines
1.4 KiB
Docker

# Copyright (C) 2019 Red Hat, Inc.
#
# This program 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 3 of the License, or
# (at your option) any later version.
#
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
FROM debian:testing as builder
RUN mkdir -p /output/bindep
RUN apt-get update && apt-get install -y python3-pip git && pip3 install bindep
COPY bindep.txt /bindep.txt
RUN cd / && bindep -l newline > /output/bindep/run.txt
RUN apt-get install -y $(bindep -b compile)
COPY . /src
RUN cd /src \
&& autoreconf -fi \
&& ./configure --with-comment=$(git describe --always) \
&& make \
&& make install
FROM debian:testing
COPY --from=builder /output/bindep/run.txt /run.txt
RUN apt-get update \
&& apt-get install -y dumb-init $(cat /run.txt) \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /run.txt
COPY --from=builder /usr/local /usr/local
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/usr/local/bin/zuul-preview"]