-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
27 lines (22 loc) · 897 Bytes
/
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
#
# Dockerfile for an alpine-based python container for python-vipaccess
#
# Create named image to make it easier to refer to
# "docker build . -t python-vipaccess"
# Run vipaccess to generate tokens with
# "docker run python-vipaccess provision -p"
# Generate ANSI graphics QR code from generated otpauth string
# "docker run --entrypoint "qrencode" python-vipaccess -t ANSI256 <otpauth://...>"
#
FROM python:3-alpine
LABEL maintainer "Kayvan Sylvan <kayvansylvan@gmail.com>"
COPY . /usr/src/
WORKDIR /usr/src
RUN apk add --no-cache --virtual .build-deps \
gcc libc-dev libxml2-dev libxslt-dev \
&& apk add --no-cache libxml2 libxslt \
&& apk add --no-cache libqrencode \
&& pip3 install --no-cache-dir . \
&& find /usr/local -name *.pyo -o -name *.pyc -exec rm -f '{}' \; \
&& apk del .build-deps && touch /root/.vipaccess
ENTRYPOINT ["/usr/local/bin/vipaccess"]