Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Dockerfile #5

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ARG PYTHON_VER="3.8"

FROM python:${PYTHON_VER}-slim as BASE

WORKDIR /local

COPY . .

RUN pip3 install --no-cache-dir --upgrade jinja2 pip setuptools wheel \
&& python3 setup.py install \
# Clean up pycache
&& find / | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf \
# Clean up local folder
&& rm /local/* -rf

ARG J2LINT_VER=""
ARG RELEASE_DATE=""

LABEL org.opencontainers.image.authors="Arista Ansible Team <[email protected]>" \
org.opencontainers.image.created=${RELEASE_DATE} \
org.opencontainers.image.title="j2lint" \
org.opencontainers.image.vendor="Arista" \
org.opencontainers.image.version=${J2LINT_VER}