2019-08-22 19:38:23 +00:00
|
|
|
FROM ubuntu:18.04
|
2019-08-06 22:01:01 +00:00
|
|
|
|
2019-08-22 19:38:23 +00:00
|
|
|
RUN apt-get update -yqq \
|
|
|
|
&& apt-get install -yqq --no-install-recommends software-properties-common \
|
|
|
|
sudo curl wget cmake locales git gcc-8 g++-8 \
|
|
|
|
openssl libssl-dev libjsoncpp-dev uuid-dev zlib1g-dev \
|
|
|
|
postgresql-server-dev-all libmariadbclient-dev libsqlite3-dev \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& locale-gen en_US.UTF-8 \
|
|
|
|
&& cd /opt/ \
|
|
|
|
&& wget -qO- https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/6.0.0/flyway-commandline-6.0.0-linux-x64.tar.gz | tar xvz \
|
|
|
|
&& sudo ln -s /opt/flyway-6.0.0/flyway /usr/local/bin
|
2019-08-06 22:01:01 +00:00
|
|
|
|
2019-08-22 19:38:23 +00:00
|
|
|
ENV LANG=en_US.UTF-8 \
|
|
|
|
LANGUAGE=en_US:en \
|
|
|
|
LC_ALL=en_US.UTF-8 \
|
|
|
|
CC=gcc-8 \
|
|
|
|
CXX=g++-8 \
|
|
|
|
AR=gcc-ar-8 \
|
|
|
|
RANLIB=gcc-ranlib-8 \
|
|
|
|
IROOT=/install
|
2019-08-06 22:01:01 +00:00
|
|
|
|
2019-08-22 19:38:23 +00:00
|
|
|
ENV DROGON_ROOT=$IROOT/drogon \
|
|
|
|
CORE_ROOT=$IROOT/core
|
|
|
|
|
|
|
|
ADD https://api.github.com/repos/an-tao/drogon/git/refs/heads/master $IROOT/version.json
|
|
|
|
RUN git clone https://github.com/an-tao/drogon $DROGON_ROOT
|
|
|
|
|
|
|
|
WORKDIR $DROGON_ROOT
|
2019-08-06 22:01:01 +00:00
|
|
|
|
|
|
|
RUN ./build.sh
|
|
|
|
|
2019-08-22 19:38:23 +00:00
|
|
|
COPY . $CORE_ROOT
|
|
|
|
|
|
|
|
WORKDIR $CORE_ROOT
|
2019-08-17 00:07:01 +00:00
|
|
|
|
2019-08-22 19:38:23 +00:00
|
|
|
RUN ./build.sh
|
2019-08-17 00:07:01 +00:00
|
|
|
|
2019-08-22 19:38:23 +00:00
|
|
|
WORKDIR /srv/core
|
2019-08-17 00:07:01 +00:00
|
|
|
EXPOSE 5000
|
2019-08-22 19:38:23 +00:00
|
|
|
ENTRYPOINT ["./core"]
|