Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
switch to multi-stage docker build
- Loading branch information
Vamshi Surabhi
committed
May 6, 2018
1 parent
a3660a8
commit e407741
Showing
3 changed files
with
20 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
FROM hasura/haskell-docker-packager:1.1 | ||
RUN apt-get update && apt-get install -y pkgconf libcurl4-openssl-dev libpq-dev \ | ||
FROM debian:jessie-20180426 as skor-builder | ||
MAINTAINER vamshi@hasura.io | ||
|
||
RUN apt-get update && apt-get install -y build-essential pkgconf libcurl4-openssl-dev libpq-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY ./src /skor/src | ||
COPY Makefile /skor/ | ||
WORKDIR /skor | ||
RUN make | ||
|
||
FROM debian:jessie-20180426 | ||
|
||
RUN apt-get update && apt-get install -y libcurl3 libpq5 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV DBNAME "postgres" | ||
ENV PGUSER "postgres" | ||
ENV PGPASS "''" | ||
ENV PGPASS "''" | ||
ENV PGHOST "localhost" | ||
ENV PGPORT 5432 | ||
ENV WEBHOOKURL "http://localhost:5000" | ||
ENV LOG_LEVEL "2" | ||
|
||
COPY ./src /skor/src | ||
COPY --from=skor-builder /skor/build/skor /usr/bin/skor | ||
COPY Makefile /skor/ | ||
WORKDIR /skor | ||
|
||
RUN make | ||
|
||
CMD "./build/skor" "host=${PGHOST} port=${PGPORT} dbname=${DBNAME} user=${PGUSER} password=${PGPASS}" ${WEBHOOKURL} | ||
CMD "skor" "host=${PGHOST} port=${PGPORT} dbname=${DBNAME} user=${PGUSER} password=${PGPASS}" "${WEBHOOKURL}" "${LOG_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.