From dc73b2b613482db35446806bf0aae23257025cba Mon Sep 17 00:00:00 2001 From: ryanmerolle Date: Tue, 4 Jan 2022 12:36:55 -0500 Subject: [PATCH] add Dockerfile --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5aa973f --- /dev/null +++ b/Dockerfile @@ -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 " \ + org.opencontainers.image.created=${RELEASE_DATE} \ + org.opencontainers.image.title="j2lint" \ + org.opencontainers.image.vendor="Arista" \ + org.opencontainers.image.version=${J2LINT_VER}