27 lines
1.1 KiB
Docker
27 lines
1.1 KiB
Docker
# Base on latest (edge) alpine image
|
|
FROM harbor.ervine.dev/public/x86_64/alpine:v3.12
|
|
LABEL MAINTAINER="Jonathan Ervine <docker@ervine.org>"
|
|
|
|
# Install updates
|
|
ENV LANG='en_US.UTF-8' \
|
|
LANGUAGE='en_US.UTF-8' \
|
|
FLASK_APP=/data/app-dev/app.py
|
|
|
|
RUN apk update && \
|
|
apk -U upgrade --ignore alpine-baselayout && \
|
|
apk -U add python3 gcc py3-pip python3-dev musl-dev libffi-dev git curl && \
|
|
adduser -D python && \
|
|
mkdir /data && cd /data && git clone --single-branch --branch master https://git.ervine.org/jonny/flask-python-helm /data && \
|
|
pip3 install -r /data/requirements.txt && \
|
|
curl -L "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl && \
|
|
chmod 755 /us/local/bin/kubectl && \
|
|
curl -L https://get.helm.sh/helm-v2.13.1-linux-amd64.tar.gz -o /tmp/helm-2.13.1.tgz && \
|
|
tar -zxvf /tmp/helm-2.13.1.tgz --strip-components=1 -C /usr/local/bin linux-amd64/helm && \
|
|
rm -rf /tmp/src && rm -rf /var/cache/apk/*
|
|
|
|
EXPOSE 3000
|
|
|
|
#USER python
|
|
|
|
CMD [ "/usr/bin/python3", "/data/main.py" ]
|