-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
- Loading branch information
1 parent
37747e3
commit c6e3589
Showing
1 changed file
with
11 additions
and
32 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,35 +1,14 @@ | ||
FROM node:latest | ||
|
||
EXPOSE 3000 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
g++ \ | ||
make \ | ||
wget \ | ||
git \ | ||
&& apt-get clean | ||
|
||
WORKDIR /root | ||
|
||
# Install Thrift 0.10.0 | ||
RUN wget -q http://archive.apache.org/dist/thrift/0.10.0/thrift-0.10.0.tar.gz && \ | ||
tar -xzf thrift-0.10.0.tar.gz && \ | ||
cd thrift-0.10.0 && \ | ||
./configure --without-python && \ | ||
make && \ | ||
ln -n ~/thrift-0.10.0/compiler/cpp/thrift /usr/local/bin/thrift | ||
|
||
RUN cd / && git clone https://github.com/mitdbg/modeldb | ||
|
||
FROM thrift:0.11 AS build-env | ||
RUN apt-get update && apt-get install -y git | ||
RUN git clone https://github.com/mitdbg/modeldb | ||
ADD manager/modeldb/frontend /modeldb/frontend | ||
|
||
WORKDIR /modeldb/frontend | ||
|
||
RUN npm install | ||
|
||
RUN mkdir -p './thrift' && \ | ||
thrift -r -out './thrift' -gen js:node '../thrift/ModelDB.thrift' && \ | ||
npm install | ||
ENTRYPOINT ["/modeldb/dockerbuild/wait_for_backend.sh"] | ||
CMD ["backend"] | ||
thrift -r -out './thrift' -gen js:node '../thrift/ModelDB.thrift' | ||
|
||
FROM node:alpine | ||
COPY --from=build-env /modeldb /modeldb | ||
WORKDIR /modeldb/frontend | ||
RUN npm install | ||
EXPOSE 3000 | ||
ENTRYPOINT ["sh","/modeldb/dockerbuild/wait_for_backend.sh"] |