File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1- FROM python:3.8-slim-buster
1+ FROM python:3.8-slim-buster as build
22# python:3.7-slim-stretch (using Debian 9) has fewer issues with invalid https certificiates than python:3.7-slim-buster (using Debian 10).
33# As of 2019-11-29, python:3.8-slim-stretch doesn't exist. See https://github.com/docker-library/python/issues/428
44WORKDIR /app
@@ -15,3 +15,13 @@ USER app
1515ENTRYPOINT ["python" , "-m" , "ircurltitlebot" ]
1616CMD ["--config-path" , "/config/config.yaml" ]
1717STOPSIGNAL SIGINT
18+
19+ FROM build as test
20+ WORKDIR /app
21+ USER root
22+ COPY pylintrc pyproject.toml requirements-dev.in setup.cfg vulture.txt ./
23+ COPY scripts/test.sh ./scripts/test.sh
24+ RUN pip install --no-cache-dir -Ur requirements-dev.in && \
25+ ./scripts/test.sh
26+
27+ FROM build
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # This script builds a containerized image. It can be run locally or in a remote CI workflow.
3+ set -euxo pipefail
4+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
5+ cd " ${DIR} " /..
6+
7+ BASEDIR=" ${PWD##*/ } "
8+ IMAGE_NAME=" ${BASEDIR} "
9+
10+ docker build -t " ${IMAGE_NAME} " .
11+ docker images
You can’t perform that action at this time.
0 commit comments