fix: better Dockerfiles

This commit is contained in:
Tobias Reisinger 2019-08-17 02:07:01 +02:00
parent a5496d6fe1
commit a33e8f2c05
2 changed files with 34 additions and 1 deletions

View file

@ -1,4 +1,4 @@
FROM drogonframework/drogon
FROM drogonframework/drogon AS installer
ENV CORE_ROOT=$IROOT/core
@ -10,4 +10,10 @@ WORKDIR $CORE_ROOT
RUN ./build.sh
FROM drogonframework/drogon
COPY --from=installer /srv/core /srv/core
EXPOSE 5000
ENTRYPOINT ["/srv/core"]

27
Dockerfile.drogon Normal file
View file

@ -0,0 +1,27 @@
FROM ubuntu:18.04
RUN apt-get update -yqq && \
apt-get install -yqq --no-install-recommends software-properties-common && \
apt-get install -yqq --no-install-recommends sudo curl wget cmake locales git \
openssl libssl-dev libjsoncpp-dev uuid-dev zlib1g-dev postgresql-server-dev-all \
libmariadbclient-dev libsqlite3-dev gcc-8 g++-8 && \
locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV CC=gcc-8
ENV CXX=g++-8
ENV AR=gcc-ar-8
ENV RANLIB=gcc-ranlib-8
ENV IROOT=/install
ENV DROGON_ROOT=$IROOT/drogon
WORKDIR $IROOT
ADD https://api.github.com/repos/an-tao/drogon/git/refs/heads/master version.json
RUN git clone https://github.com/an-tao/drogon
WORKDIR $DROGON_ROOT
RUN ./build.sh