From 85e4736db8d49513a898d1aa076939d748d5df70 Mon Sep 17 00:00:00 2001 From: Sawood Alam Date: Thu, 5 Mar 2020 22:16:00 -0500 Subject: [PATCH 1/2] Publish Docker image to GitHub Package Registry --- .github/workflows/publish.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..7a1407f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +name: Publish Docker Images + +on: + push: + branches: + - master + release: + types: + - published + +jobs: + publish-master: + runs-on: ubuntu-18.04 + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@master + - name: Build and Publish master + uses: VaultVulp/gp-docker-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + image-name: memgator + image-tag: master + publish-release: + runs-on: ubuntu-18.04 + if: startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@master + - name: Build and Publish latest + uses: VaultVulp/gp-docker-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + image-name: memgator + - name: Build and Publish versioned + uses: VaultVulp/gp-docker-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + image-name: memgator + extract-git-tag: true From 13bbef58f6975982df2e6384ad9f38a6d629d4d2 Mon Sep 17 00:00:00 2001 From: Sawood Alam Date: Thu, 5 Mar 2020 22:35:54 -0500 Subject: [PATCH 2/2] Document Docker image building steps and registery options --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 578a1e3..ff6f709 100644 --- a/README.md +++ b/README.md @@ -69,10 +69,24 @@ Depending on the machine and operating system download appropriate binary from t ## Running as a Docker Container -The first command below is not necessary, but it allows pulling the latest version of the MemGator Docker image. +Build a Docker image locally from the source. ``` +$ git clone https://github.com/oduwsdl/MemGator.git +$ cd MemGator +$ docker image build -t oduwsdl/memgator . +``` + +Alternatively, pull a published image from one of the two Docker image registries below: + +``` +$ docker image pull docker.pkg.github.com/oduwsdl/memgator/memgator $ docker image pull oduwsdl/memgator +``` + +Run MemGator with various options inside a Docker container. + +``` $ docker container run -it --rm oduwsdl/memgator -h $ docker container run -it --rm oduwsdl/memgator [options] {URI-R} $ docker container run -it --rm oduwsdl/memgator [options] {URI-R} {YYYY[MM[DD[hh[mm[ss]]]]]}