Skip to content

Commit

Permalink
Update Dockerfile to push both latest and versioned tag (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
goyalmunish authored Apr 15, 2022
1 parent b4ef62d commit 365af3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Additionally, from the **Main Menu**:

### Easily run the tool via Docker (recommended)

_This is the easiest way to get going, if you have [Docker](https://docs.docker.com/get-docker/) installed. Just issue the following commands:_
_This is the easiest way to get going, if you have [Docker](https://docs.docker.com/get-docker/) installed. Just download the [`reminder` image](https://hub.docker.com/r/goyalmunish/reminder/tags) by issuing the following commands:_

```sh
# pull the image
Expand Down
10 changes: 8 additions & 2 deletions dev_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,15 @@ cd cmd/reminder

## Build Docker Image

_Make use of [`build_image.sh`](./scripts/build_image.sh) to build and push (requires admin rights) Docker image:_
_Make use of [`build_image.sh`](./scripts/build_image.sh) to build and push (requires admin rights) [Docker image](https://hub.docker.com/r/goyalmunish/reminder/tags):_

```sh
# cd into repo
cd reminder/
. ./scripts/build_image.sh

# example, setting version
VERSION=v1.0.0

# building images and pushing them
. ./scripts/build_image.sh VERSION
```
6 changes: 4 additions & 2 deletions scripts/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ REMINDER_IMAGE=reminder
REMINDER_CONTAINER=reminder
TAG="${@:-latest}"

# building and pushing default (bionic) image
# building and pushing default image
echo "STEP-01: Build and tagging the default image"
docker build -t goyalmunish/${REMINDER_IMAGE} -f Dockerfile ./
echo "STEP-02: Push the default image"
echo "STEP-03: Push the images"
docker push goyalmunish/${REMINDER_IMAGE}:latest
docker push goyalmunish/${REMINDER_IMAGE}:${TAG}
echo "STEP-03: Pull the default image"
docker pull goyalmunish/${REMINDER_IMAGE}:latest
docker pull goyalmunish/${REMINDER_IMAGE}:${TAG}

0 comments on commit 365af3f

Please sign in to comment.