Skip to content

Commit

Permalink
0.1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
IbrahimTanyalcin committed Dec 14, 2021
1 parent d67f705 commit c0d8de9
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CHANGELOG

# NPM_0.1.19 - NPM_0.1.22 / IPV_2.5
# NPM_0.1.19 - NPM_0.1.23 / IPV_2.5

- Below fields are now optional:
- `variation.fileName`
Expand Down
18 changes: 10 additions & 8 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
To get a list of published images:

[![Readme-Docker](https://img.shields.io/badge/ibowankenobi-ipv-skyblue
)](https://hub.docker.com/repository/docker/ibowankenobi/i-pv)
)](https://hub.docker.com/r/ibowankenobi/i-pv)

## Quickstart

Expand Down Expand Up @@ -80,7 +80,7 @@ You can see the image id using `docker image list`. If you cannot remove the ima
## Option 2: Pull the image from Docker Hub

```shell
docker pull i-pv:1.0.0
docker pull ibowankenobi/i-pv
```

## Running the container
Expand All @@ -90,30 +90,32 @@ Assuming you have your input file in `/path/to/folder`:
docker run -it --mount type=bind,source=/path/to/folder,target=/app/mount image_name:tag_name
```

If you did not build the image but pulled it instead, then:
The `image_name` is a combination of `DockerID` and repo name, for IPV, it should be `ibowankenobi/i-pv`. If you did not build the image but pulled it instead, then:

```shell
docker run -it --mount type=bind,source=/path/to/folder,target=/app/mount i-pv:1.0.0
docker run -it --mount type=bind,source=/path/to/folder,target=/app/mount ibowankenobi/i-pv:1.0.0
```

Replace `ibowankenobi/i-pv:1.0.0` with the version you want or `ibowankenobi/i-pv:latest`.

In Linux system beware that path's starting with `/` are absolute. In Windows the above command would look something like:

```shell
docker run -it --mount type=bind,source=D:\Tests\mountTest,target=/app/mount i-pv:1.0.0
docker run -it --mount type=bind,source=D:\Tests\mountTest,target=/app/mount ibowankenobi/i-pv:1.0.0
```

Inside the container the processes do NOT run as root but as the user 'IPV'. For that reason, on Linux systems make sure the mounted drive has write access permissions, something like `755`.

The default mount path is assumed to be `/app/mount` inside the container. You can override it by setting an environment variable called `MOUNT_PATH`:

```shell
docker run -it -e MOUNT_PATH='/app/anotherLocation' --mount type=bind,source=/path/to/folder,target=/app/anotherLocation i-pv:1.0.0
docker run -it -e MOUNT_PATH='/app/anotherLocation' --mount type=bind,source=/path/to/folder,target=/app/anotherLocation ibowankenobi/i-pv:1.0.0
```

Or pass `--mount` argument:

```shell
docker run -it --mount type=bind,source=/path/to/folder,target=/app/anotherLocation i-pv:1.0.0 --mount /app/anotherLocation
docker run -it --mount type=bind,source=/path/to/folder,target=/app/anotherLocation ibowankenobi/i-pv:1.0.0 --mount /app/anotherLocation
```

## List of arguments
Expand All @@ -135,7 +137,7 @@ Runs it in daemon mode, this functionality is not implemented yet. Instead you w
If you want to change the location of the mounted folder inside the container, along with using `docker run -it --mount ...`, you also need to tell the `Node` process where is the mounted folders location. You can either do this by setting environment variables or the `-m` argument. `--mount` or `-m` has higher order of precedence compared to `MOUNT_PATH` environment variable. If both are not set, then the `Node` process assumes the mounted folder location is `/app/mount`. For example:

```shell
docker run -it -e MOUNT_PATH='/app/anotherLocation1' --mount type=bind,source=/path/to/folder,target=/app/anotherLocation2 i-pv:1.0.0 -i yourInput.json -m /app/anotherLocation2
docker run -it -e MOUNT_PATH='/app/anotherLocation1' --mount type=bind,source=/path/to/folder,target=/app/anotherLocation2 ibowankenobi/i-pv:1.0.0 -i yourInput.json -m /app/anotherLocation2
```

Above command would disregard the `MOUNT_PATH` env variable and correctly report the location of the mounted folder as `/app/anotherLocation2` because `-m` overrides docker's `-e`.
Expand Down
12 changes: 12 additions & 0 deletions docker/app/bin/cleanUp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
#dpkg-query -Wf '${Installed-Size}\t${Package}:${Version}' | sort -n
#above to get list of binaries installed
#merging the RUN commands in the dockerfile using
#shell form does not seem to cut down the image size.
#Executing the commands below should normally remove
#around 200mb of data, however that is not reflected
#in the final image size either
apt-get -y remove --purge git;
apt-get clean;
rm -rf /var/lib/apt/lists/*;
npm cache clean --force;
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ibowankenobi-i-pv",
"version": "0.1.22",
"version": "0.1.23",
"org_ipv": {
"version": "2.5"
},
Expand Down

0 comments on commit c0d8de9

Please sign in to comment.