feat: pkg docker

This commit is contained in:
Aravinth Manivannan 2023-10-01 19:59:31 +05:30
parent eb1bb8fbbc
commit f24edf9800
Signed by: realaravinth
GPG key ID: F8F50389936984FF
3 changed files with 33 additions and 0 deletions

4
.env_sample Normal file
View file

@ -0,0 +1,4 @@
export FTEST_AUTH="foobar"
export FTEST_HOST="http://ftest.example.org"
export FTEST_TARGET_HOST="http://localhost:3000"
export FTEST_USER="john@example.org"

16
Dockerfile Normal file
View file

@ -0,0 +1,16 @@
FROM python
LABEL org.opencontainers.image.source https://git.batsense.net/ForgeFlux/ap-test
RUN useradd -ms /bin/bash -u 1001 ap
RUN apt-get update && apt-get install -y ca-certificates git
WORKDIR /src/
COPY requirements.txt .
RUN pip install -r requirements.txt
USER ap
WORKDIR /home/ap
RUN mkdir app/
WORKDIR /home/ap/app/
COPY . .
CMD [ "behave"]

13
Makefile Normal file
View file

@ -0,0 +1,13 @@
lint:
black ./common/ ./features/
docker.build:
docker buildx build -t forgeflux/ap-test --load .
docker.run:
docker run \
--network=ftest \
-e FTEST_AUTH=${FTEST_AUTH} \
-e FTEST_HOST=${FTEST_HOST} \
-e FTEST_TARGET_HOST=${FTEST_TARGET_HOST} \
-e FTEST_USER=${FTEST_USER} forgeflux/ap-test