This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05a9267
commit cda432d
Showing
1 changed file
with
31 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM node:11 | ||
|
||
MAINTAINER John Brugge <[email protected]> | ||
|
||
EXPOSE 1337 | ||
|
||
ENV NODE_ENV production | ||
|
||
ENV APP_DIR /usr/src/mmlc-api | ||
ENV BUILD_PACKAGES curl unzip | ||
ENV RUNTIME_PACKAGES openjdk-8-jre-headless python netcat-openbsd | ||
|
||
RUN mkdir $APP_DIR | ||
|
||
WORKDIR $APP_DIR | ||
|
||
COPY . $APP_DIR | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y $BUILD_PACKAGES $RUNTIME_PACKAGES && \ | ||
npm -y install && \ | ||
curl -O http://www.apache.org/dist/xmlgraphics/batik/binaries/batik-bin-1.10.zip && \ | ||
unzip batik-bin-1.10.zip && \ | ||
mv batik-1.10 node_modules/mathjax-node/batik/ && \ | ||
rm -rf batik* && \ | ||
chmod -R ugo+rw $APP_DIR && \ | ||
apt-get purge --yes --auto-remove $BUILD_PACKAGES && \ | ||
apt-get clean && \ | ||
chmod +x wait_for.sh | ||
|
||
CMD ./wait_for.sh mongo 27017 && node app.js |