feat: init Docker pkg
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Aravinth Manivannan 2023-10-01 13:55:54 +05:30
parent c27badb81c
commit 97b1c04036
Signed by: realaravinth
GPG key ID: F8F50389936984FF
3 changed files with 37 additions and 0 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
venv/
.env
nodeinfo.log

20
.woodpecker.yml Normal file
View file

@ -0,0 +1,20 @@
pipeline:
build_docker_img:
image: plugins/docker
when:
event: [pull_request]
settings:
dry_run: true
repo: forgeflux/nodeinfo-test
tags: latest
build_and_publish_docker_img:
image: plugins/docker
when:
event: [push, tag, deployment]
settings:
username: forgeflux
password:
from_secret: DOCKER_TOKEN
repo: forgeflux/nodeinfo-test
tags: latest

14
Dockerfile Normal file
View file

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