fix instructions to use docker create

This commit is contained in:
Anton Livaja 2024-12-19 15:04:47 -05:00
parent b3197be647
commit bdaedc2f7e
Signed by: anton
GPG Key ID: 44A86CFF1FDF0E85
1 changed files with 1 additions and 3 deletions

View File

@ -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: