From 427863f7e9a9bfff43b95d0577ced74245eb88dd Mon Sep 17 00:00:00 2001 From: Ardian Date: Tue, 20 Apr 2021 13:02:43 +0200 Subject: [PATCH 1/7] Add pipeline to publish docker image to repository --- .github/workflows/pipeline.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..dd05cc0 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,19 @@ +name: Publish Nebula Docker image to DockerHub +on: + push: + branches: + - main +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: ardd97/nebula + tags: ardd97/nebula:latest \ No newline at end of file From 31bb2d4224e435c6de8a8073fde3e1a8aad79a42 Mon Sep 17 00:00:00 2001 From: Ardian Date: Tue, 20 Apr 2021 13:08:33 +0200 Subject: [PATCH 2/7] Use build-push-action version 2 --- .github/workflows/pipeline.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index dd05cc0..c2ea086 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -8,12 +8,14 @@ jobs: name: Push Docker image to Docker Hub runs-on: ubuntu-latest steps: - - name: Check out the repo - uses: actions/checkout@v2 - - name: Push to Docker Hub - uses: docker/build-push-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - repository: ardd97/nebula + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + push: true tags: ardd97/nebula:latest \ No newline at end of file From 5fa78bb5ba67329c9dcd2f75eafb6c645d5ffb5d Mon Sep 17 00:00:00 2001 From: Ardian Date: Tue, 20 Apr 2021 13:14:43 +0200 Subject: [PATCH 3/7] Use build-push-action version 2 --- .github/workflows/pipeline.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index c2ea086..099c39f 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -17,5 +17,4 @@ jobs: uses: docker/build-push-action@v2 with: context: . - push: true - tags: ardd97/nebula:latest \ No newline at end of file + push: true \ No newline at end of file From 65442a9329cc38dc35cc9469d269d85b19982ba4 Mon Sep 17 00:00:00 2001 From: Ardian Date: Tue, 20 Apr 2021 13:17:08 +0200 Subject: [PATCH 4/7] Use build-push-action version 2 --- .github/workflows/pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 099c39f..c2ea086 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -17,4 +17,5 @@ jobs: uses: docker/build-push-action@v2 with: context: . - push: true \ No newline at end of file + push: true + tags: ardd97/nebula:latest \ No newline at end of file From e1f21f17e9e8a62708ee2c9e42dbbc11afb2337e Mon Sep 17 00:00:00 2001 From: Ardian Date: Tue, 20 Apr 2021 13:20:48 +0200 Subject: [PATCH 5/7] Add checkout step --- .github/workflows/pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index c2ea086..ca451a0 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -8,6 +8,8 @@ jobs: name: Push Docker image to Docker Hub runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v2 - name: Login to DockerHub uses: docker/login-action@v1 with: From 8ed06378d80ae2ba58fd1ed7429df2ef21143364 Mon Sep 17 00:00:00 2001 From: Ardian Date: Wed, 21 Apr 2021 13:48:45 +0200 Subject: [PATCH 6/7] Use username variable --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index ca451a0..fcedcff 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -20,4 +20,4 @@ jobs: with: context: . push: true - tags: ardd97/nebula:latest \ No newline at end of file + tags: ${{ secrets.DOCKERHUB_USERNAME }}/nebula:latest \ No newline at end of file From ea4bab31082689d04f84cdfaa4f332cbb83ac4b3 Mon Sep 17 00:00:00 2001 From: Ardian Date: Wed, 21 Apr 2021 14:00:22 +0200 Subject: [PATCH 7/7] Update Readme for Docker --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2cc1928..3e32dae 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,20 @@ It is build with modules for each provider and each functionality. As of April 2 ## Installation ### Docker -To build Docker image run +Pull Nebula Docker image: + +``` +docker pull gl4ssesbo1/nebula:latest +``` +or if you want to build Docker image locally run: + ``` -docker build -t nebula . +docker build -t nebula:latest . ``` -and then run main.py through: +and then run main.py through:docker run -v nebula-ps:/app -ti nebula:latest main.py ``` -docker run -v nebula-ps:/app -ti nebula main.py +docker run -v nebula-ps:/app -ti nebula:latest main.py ``` Nebula is coded in python3.8 and tested on python3.8 and 3.9. It uses boto3 library to access AWS. To install, just install python 3.8+ and install libraries required from *requirements.txt*