add Dockerfile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
d4002b5ca9
commit
6d7f588baa
|
@ -0,0 +1,3 @@
|
|||
.venv
|
||||
__pycache__
|
||||
Dockerfile
|
|
@ -0,0 +1,38 @@
|
|||
# BUILD IMAGE --------------------------------------------------------
|
||||
FROM alpine:3.11 AS python-build
|
||||
|
||||
# Get build tools and required header files
|
||||
RUN apk add --no-cache \
|
||||
python3 python3-dev \
|
||||
py3-pip py3-virtualenv \
|
||||
git gcc musl-dev
|
||||
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
ADD . .
|
||||
|
||||
ENV VIRTUAL_ENV=/app/venv
|
||||
RUN python3 -m virtualenv --python=/usr/bin/python3 $VIRTUAL_ENV
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
|
||||
# Install python dependencies
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
# ACTUAL IMAGE -------------------------------------------------------
|
||||
FROM alpine:3.11
|
||||
|
||||
RUN apk add --no-cache python3
|
||||
|
||||
RUN mkdir /app
|
||||
COPY --from=python-build /app/. /app/
|
||||
|
||||
ENV VIRTUAL_ENV=/app/venv
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
|
||||
LABEL maintainer="jakub@status.im"
|
||||
LABEL source="https://github.com/status-im/auto-sticker-pinner"
|
||||
LABEL description="Service for pinning newly added Status Sticker Packs"
|
||||
|
||||
ENTRYPOINT ["/app/main.py"]
|
||||
# By default just show help if called without arguments
|
||||
CMD ["--help"]
|
Loading…
Reference in New Issue