fix instructions to use docker create
This commit is contained in:
parent
b3197be647
commit
bdaedc2f7e
|
@ -12,9 +12,7 @@ This tool is also available via [stagex](https://registry.hub.docker.com/r/stage
|
||||||
* `docker pull stagex/sdtool`
|
* `docker pull stagex/sdtool`
|
||||||
|
|
||||||
1. Extracting binary:
|
1. Extracting binary:
|
||||||
* Run docker container: `docker run -p 4000:80 --name sdtool stagex/sdtool`
|
* Run docker container: `docker create -p 4000:80 --name sdtool stagex/sdtool`
|
||||||
* This will error out the first time, run the command again and then you will get an error that's different that looks like this: `docker: Error response from daemon: Conflict. The container name "/sdtool" is already in use by container "679a52775dfce91f66d8894925449242eacbf4b0aeccaf2effe2c5e213e60a6b". You have to remove (or rename) that container to be able to reuse that name.`. Copy the container ID from the error message and use it in the next command
|
|
||||||
* This issue occurs because of bin/sh missing in the image so we can't run the container properly
|
|
||||||
* Copy image to tar: `docker export <container_id> -o sdtool.tar`
|
* Copy image to tar: `docker export <container_id> -o sdtool.tar`
|
||||||
* Extract binary from tar: `mkdir -p sdtool-dir | tar -xvf sdtool.tar -C sdtool-dir | cp sdtool-dir/usr/bin/sdtool ./sdtool`
|
* Extract binary from tar: `mkdir -p sdtool-dir | tar -xvf sdtool.tar -C sdtool-dir | cp sdtool-dir/usr/bin/sdtool ./sdtool`
|
||||||
* You can verify the container hash:
|
* You can verify the container hash:
|
||||||
|
|
Loading…
Reference in New Issue