forked from platypush/platypush
A better Dockerfile.
This commit is contained in:
parent
bf7d060b81
commit
f07b774e75
2 changed files with 37 additions and 12 deletions
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
**/.git
|
||||||
|
**/node_modules
|
||||||
|
**/__pycache__
|
||||||
|
**/venv
|
||||||
|
**/.mypy_cache
|
||||||
|
**/build
|
|
@ -1,19 +1,38 @@
|
||||||
# Sample Dockerfile. Use platydock -c /path/to/custom/config.yaml
|
FROM alpine
|
||||||
# to generate your custom Dockerfile.
|
ADD . /install
|
||||||
|
|
||||||
|
RUN apk add --update --no-interactive --no-cache \
|
||||||
|
python3 \
|
||||||
|
py3-pip \
|
||||||
|
py3-alembic \
|
||||||
|
py3-bcrypt \
|
||||||
|
py3-dateutil \
|
||||||
|
py3-docutils \
|
||||||
|
py3-flask \
|
||||||
|
py3-frozendict \
|
||||||
|
py3-greenlet \
|
||||||
|
py3-magic \
|
||||||
|
py3-mypy-extensions \
|
||||||
|
py3-psutil \
|
||||||
|
py3-redis \
|
||||||
|
py3-requests \
|
||||||
|
py3-rsa \
|
||||||
|
py3-sqlalchemy \
|
||||||
|
py3-tornado \
|
||||||
|
py3-typing-extensions \
|
||||||
|
py3-tz \
|
||||||
|
py3-websocket-client \
|
||||||
|
py3-websockets \
|
||||||
|
py3-wheel \
|
||||||
|
py3-yaml \
|
||||||
|
py3-zeroconf \
|
||||||
|
redis
|
||||||
|
|
||||||
FROM python:3.11-alpine
|
RUN cd /install && pip install --no-cache-dir .
|
||||||
|
RUN cd / && rm -rf /install
|
||||||
RUN mkdir -p /install /app
|
|
||||||
COPY . /install
|
|
||||||
RUN apk add --update --no-cache redis
|
|
||||||
RUN apk add --update --no-cache --virtual build-base g++ rust linux-headers
|
|
||||||
RUN pip install -U pip
|
|
||||||
RUN cd /install && pip install .
|
|
||||||
RUN apk del build-base g++ rust linux-headers
|
|
||||||
|
|
||||||
EXPOSE 8008
|
EXPOSE 8008
|
||||||
VOLUME /app/config
|
VOLUME /app/config
|
||||||
VOLUME /app/workdir
|
VOLUME /app/workdir
|
||||||
|
|
||||||
CMD python -m platypush --start-redis --config-file /app/config/config.yaml --workdir /app/workdir
|
CMD platypush --start-redis --config-file /app/config/config.yaml --workdir /app/workdir
|
||||||
|
|
Loading…
Reference in a new issue