Skip to content

Commit

Permalink
Use docker tag without 'v'
Browse files Browse the repository at this point in the history
  • Loading branch information
urpylka committed May 8, 2020
1 parent 7f8c585 commit 7441d44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Image consist two scripts:
### Execute in an image or copy files to an image

```bash
docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/mnt urpylka/img-tool:v0.4 img-chroot <IMAGE> [ exec <SCRIPT> [...] | copy <MOVE_FILES> <MOVE_TO> ]
docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/mnt urpylka/img-tool:0.4 img-chroot <IMAGE> [ exec <SCRIPT> [...] | copy <MOVE_FILES> <MOVE_TO> ]
```

Where `[...]` is arguments for `<SCRIPT>`. `<SCRIPT>` is locating on the host (and copying to target image until execution is finished). Leave `img-chroot <IMAGE>` without any argument for enter to `/bin/bash` on the target image.

### Resize an image (minimize & maximize)

```bash
docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/mnt urpylka/img-tool:v0.4 img-resize <IMAGE> [NEW_SIZE]
docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/mnt urpylka/img-tool:0.4 img-resize <IMAGE> [NEW_SIZE]
```

> If you leave `NEW_SIZE` parameter empty, program return posible minimum size. It works by **resize2fs** and maybe more than actually (for take minimum size minimize image a few times). It may also work poorly if used 1K, 2K block in FS (more on [man7.org](http://man7.org/linux/man-pages/man8/resize2fs.8.html)).
Expand Down Expand Up @@ -58,7 +58,7 @@ alias img='docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/mnt img-tool
Install the shortcut on macOS:

```bash
echo "alias img='docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/mnt urpylka/img-tool:v0.4'" >> ~/.bash_profile
echo "alias img='docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/mnt urpylka/img-tool:0.4'" >> ~/.bash_profile
```

Use the shortcut:
Expand Down

0 comments on commit 7441d44

Please sign in to comment.