Skip to content

Commit

Permalink
chore(docker): Added docker image support
Browse files Browse the repository at this point in the history
chore(docker): Implements Dockerfile for building images.
chore(docker): Implements dockerignore file
chore(docker): Implements docker image CI
chore(docker): Enabling docker CI in docker-support branch to test build process
chore(docker): Added docker image artifact upload support
fix(docker): Added static docker image label for uploading
chore(docker): Changed base image to `python:3.8-alpine`
chore(docker): Added license header
chore(docker): Removed `docker-support` branch
chore(docker): Updated authors
  • Loading branch information
aswinmurali-io committed Oct 15, 2021
1 parent 53d64b7 commit 4c6d1bd
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
.gitignore
Dockerfile*
docker-compose*
.vscode
23 changes: 23 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docker Image CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag nirjas:latest

- name: Upload image
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "nirjas:latest"
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (C) 2020 Ayush Bhardwaj (classicayush@gmail.com),
# Kaushlendra Pratap (kaushlendrapratap.9837@gmail.com)
# Aswin Murali (aswinmurali.co@gmail.com)
#
# SPDX-License-Identifier: LGPL-2.1
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Docker image for nirjas
#
# Build
# docker build -t nirjas .
#
# Run
# docker run --rm -it nirjas
# docker run --rm -it nirjas nirjas <args>

FROM python:3.8-alpine

COPY . ./

RUN python3 setup.py install

# Default command as intro text

CMD [ "nirjas" , "-h" ]

0 comments on commit 4c6d1bd

Please sign in to comment.