diff --git a/.dockerignore b/.dockerignore new file mode 120000 index 0000000..3e4e48b --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.gitignore \ No newline at end of file diff --git a/.gitignore b/.gitignore index e2bd56f..be245d1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ .coverage /*.md /.eggs/ -/devel/ \ No newline at end of file +/devel/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c8fd5dd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM python:3.10-slim + +LABEL org.label-schema.schema-version="1.0" +LABEL org.label-schema.vendor="Tiara Rodney (victoryk.it)" +LABEL org.label-schema.name="victorykit/httpaste" +LABEL org.label-schema.description="a versatile HTTP pastebin" +LABEL org.label-schema.vcs-url="https://bitbucket.org/victorykit/docker-selenium-grid" +LABEL org.label-schema.docker.cmd="docker run {image-id} {httpaste-args}" +LABEL org.label-schema.version=$BUILD_VERSION +LABEL org.label-schema.build-date=$BUILD_DATE + +WORKDIR /usr/local/src/httpaste + +COPY . . + +RUN apt-get update && \ + apt-get install -y libffi-dev gcc && \ + python3 setup.py install && \ + apt-get remove -y libffi-dev gcc && apt-get autoremove -y && apt-get clean -y + +ENTRYPOINT ["httpaste"] diff --git a/tox.ini b/tox.ini index 28b7f1d..c1f0e88 100644 --- a/tox.ini +++ b/tox.ini @@ -35,6 +35,15 @@ deps = commands = python3 -m build {posargs} +[testenv:build-docker] +description = build docker image +passenv = + DOCKER_* +allowlist_externals = + docker + sh +commands = + docker image build -t victorykit/httpaste . [testenv:docs] description = build documentation