forked from nekoyume/nekoyume
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (32 loc) · 1.1 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
# Use an official Python runtime as a parent image
FROM python:3.6-slim
# runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libgmp-dev \
pkg-config \
dh-autoreconf \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/eficode/wait-for/raw/master/wait-for
RUN chmod +x wait-for
RUN mv wait-for /usr/bin/
# Set the working directory to /app
WORKDIR /app
# Cache dependencies if possible
COPY setup.py /app
RUN python -c 'from setup import *; print("\n".join(install_requires))' \
> /tmp/requirements.txt && \
pip install -r /tmp/requirements.txt && \
rm /tmp/requirements.txt
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN pip install --trusted-host pypi.python.org -r requirements.txt
# Make port 8080 available to the world outside this container
EXPOSE 8080
# Define environment variable
ENV PORT 8080
# Run app.py when the container launches
ENTRYPOINT ["bash", "-c"]
CMD ["nekoyume init && honcho start"]