-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (47 loc) · 1.45 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# css/js asset builder
FROM node:alpine as builder
WORKDIR /build
COPY package.json yarn.lock ./
COPY react-title-component/ react-title-component/
RUN yarn
COPY .babelrc .eslintrc.yml postcss.config.js webpack.config.js ./
COPY circle_core/web/src/ circle_core/web/src/
RUN yarn run build
#
FROM python:3.6-alpine3.8
# setup nanomsg
WORKDIR /app
ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/usr/local/lib64
# setup modules
COPY Pipfile Pipfile.lock setup.py ./
RUN apk --update add gettext libffi libxml2 libstdc++ && \
apk --virtual .build-deps add build-base cmake curl libffi-dev libxml2-dev libxslt-dev && \
# build nanomsg
mkdir /build && cd /build && \
curl -OL https://github.com/nanomsg/nanomsg/archive/1.1.5.tar.gz && \
tar zxvf 1.1.5.tar.gz && \
cd nanomsg-1.1.5 && \
mkdir build && cd build && \
cmake .. && \
cmake --build . && \
ctest . && \
cmake --build . --target install && \
rm -r /build && \
# build python
cd /app && \
pip install -U pip pipenv && \
pipenv install -v --system --deploy && \
# cleanup
apk del --purge .build-deps
# copy sources
COPY docker/entrypoint.sh docker/wait_host.sh ./
COPY docker/circle_core.ini.template ./
COPY --from=builder /build/circle_core/web/static/ ./circle_core/web/static/
COPY . /app
EXPOSE 8080
VOLUME /app/data
ENV DB_URL mysql+pymysql://root@localhost/crcr_dev
ENV BASE_URL http://127.0.0.1:8080/
ENV HTTP_PORT 8080
ENTRYPOINT ["./entrypoint.sh"]
CMD ["run"]