xref: /conch/Dockerfile.dev (revision 41ac65be)
1FROM ubuntu:bionic
2LABEL maintainer "sungo@joyent.com"
3LABEL org.label-schema.vendor "Joyent, Inc"
4LABEL org.label-schema.vcs-url "https://github.com/joyent/conch.git"
5
6# Postgres is included so the user can run `make test` which requires the ability to stand up a real temporary Postgres database
7
8# The Joyent production database is (as of writing) PostgreSQL 9.6 so we do the
9# magic dance to get 9.6 for ourselves, since bionic ships 10.
10ENV DEBIAN_FRONTEND=noninteractive
11RUN apt-get update && \
12	apt-get install -y --no-install-recommends \
13		build-essential \
14		ca-certificates \
15		carton \
16		git \
17		libssl-dev \
18		libzip-dev \
19		perl-doc \
20		unzip \
21	&& apt-get clean
22
23RUN apt-get update && \
24	apt-get install -y --no-install-recommends \
25		curl \
26		gnupg2 \
27		software-properties-common \
28	&& apt-get clean
29
30RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
31
32RUN add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" && \
33	apt-get update && \
34	apt-get install -y --no-install-recommends \
35		postgresql-9.6 \
36		postgresql-contrib-9.6 \
37		libpq-dev \
38	&& apt-get clean
39
40
41RUN mkdir -p /app/conch
42WORKDIR /app/conch
43
44COPY . /app/conch
45
46ARG VCS_REF="master"
47ARG VERSION="v0.0.0-dirty"
48
49LABEL org.label-schema.vcs-ref $VCS_REF
50LABEL org.label-schema.version $VERSION
51
52ENV LANG C.UTF-8
53ENV EV_EXTRA_DEFS -DEV_NO_ATFORK
54ENV MOJO_CONFIG /app/conch/etc/conch.conf
55
56ENV MOJO_LISTEN http://0.0.0.0:5000
57EXPOSE 5000
58
59ENTRYPOINT ["make"]
60ENV HARNESS_OPTIONS j6:c
61CMD [ "forcebuild", "test"]
62
63# vim: se syn=dockerfile:
64