fix: docker files

This commit is contained in:
Tobias Reisinger 2019-08-17 11:04:15 +02:00
parent a33e8f2c05
commit 17b0b86f6d
4 changed files with 30 additions and 13 deletions

View file

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

View file

@ -21,7 +21,4 @@ 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
RUN git clone https://github.com/an-tao/drogon && cd drogon && ./build.sh

View file

@ -29,5 +29,7 @@ if [ "$?" != "0" ]; then
exit -1
fi
cp core /srv/
cp config.json /srv/
cp core /bin/
mkdir /srv/core
cp config.json /srv/core

21
docker-compose.yml Normal file
View file

@ -0,0 +1,21 @@
version: '3.2'
volumes:
v-core-data:
services:
drogon-arm:
image: drogonframework/drogon-arm
build:
context: .
dockerfile: Dockerfile.drogon
core:
image: registry.gitlab.com/emgauwa/core
build:
context: .
dockerfile: Dockerfile
restart: always
ports:
- "80:5000"
volumes:
- type: volume
source: v-core-data
target: /srv/core