-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
44 lines (35 loc) · 1.39 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
FROM python:3.7-alpine
# Dockerize related args
ARG BUILD_DATE
ARG VCS_REF
ARG BRANCH=develop
ENV DOCKERIZE_VERSION v0.6.1
ENV CRYPTOGRAPHY_DONT_BUILD_RUST 1
# Install dockerize
RUN apk --update add --virtual deps curl tar gzip && \
curl -o dockerize.tar.gz https://raw.githubusercontent.com/kbase/dockerize/master/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && \
tar -C /usr/local/bin -xvzf dockerize.tar.gz && \
rm dockerize.tar.gz && \
apk del deps
# Dockerize related labels
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/kbase/index_runner" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0-rc1" \
us.kbase.vcs-branch=$BRANCH \
maintainer="KBase Team"
WORKDIR /app
# Dependency for confluent-kafka
RUN apk --update add librdkafka librdkafka-dev && ldconfig /usr/lib
# Install dependencies
COPY pyproject.toml poetry.lock /app/
RUN apk --update add --virtual deps python3-dev build-base libffi-dev libressl-dev && \
pip install --upgrade pip poetry==1.0.9 && \
poetry config virtualenvs.create false && \
poetry install --no-dev --no-interaction --no-ansi && \
apk del deps
# Make the admin tools executable
RUN ln -s /app/src/admin_tools/indexer_admin /usr/local/bin/indexer_admin
COPY . /app
ENTRYPOINT ["/usr/local/bin/dockerize"]
CMD ["/app/scripts/docker/start_server"]