mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
49 lines
971 B
Docker
49 lines
971 B
Docker
FROM python:3.8-slim-buster AS compile-image
|
|
|
|
WORKDIR /
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
|
apt-get install -y \
|
|
libpq-dev \
|
|
gcc \
|
|
libffi-dev \
|
|
build-essential
|
|
|
|
RUN python -m venv /opt/venv
|
|
# Make sure we use the virtualenv:
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
|
|
|
COPY requirements.txt /
|
|
|
|
RUN pip install --upgrade pip && \
|
|
pip install -r requirements.txt
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy the source code.
|
|
COPY squeaknode ./squeaknode
|
|
COPY proto ./proto
|
|
COPY LICENSE MANIFEST.in README.md requirements.txt setup.cfg setup.py ./
|
|
|
|
RUN python3 setup.py install
|
|
|
|
FROM python:3.8-slim-buster
|
|
|
|
COPY --from=compile-image /opt/venv /opt/venv
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
|
apt-get install -y libpq-dev
|
|
|
|
EXPOSE 8774
|
|
EXPOSE 8994
|
|
# Web server
|
|
EXPOSE 12994
|
|
|
|
# Make sure we use the virtualenv:
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
|
|
|
# Copy the entrypoint script.
|
|
COPY "start-squeaknode.sh" .
|
|
RUN chmod +x start-squeaknode.sh
|
|
|
|
CMD ["./start-squeaknode.sh"]
|