From 8665e49042c6765572072635f64754e28585fdbd Mon Sep 17 00:00:00 2001 From: Jeremy Lin Date: Sun, 21 Feb 2021 13:14:42 -0800 Subject: [PATCH] add docker-image-extract details --- Pre-built-binaries.md | 50 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/Pre-built-binaries.md b/Pre-built-binaries.md index 68d5b4a..27a2c0d 100644 --- a/Pre-built-binaries.md +++ b/Pre-built-binaries.md @@ -23,4 +23,52 @@ docker pull --platform linux/arm/v7 bitwardenrs/server:alpine ## Extracting binaries without Docker installed -TODO \ No newline at end of file +If you can't or don't want to install Docker, you can use the [docker-image-extract](https://github.com/jjlin/docker-image-extract) script to pull and extract a Docker image. For example, to pull and extract the x86-64 image: +``` +$ mkdir bwrs-image +$ cd bwrs-image +$ wget https://raw.githubusercontent.com/jjlin/docker-image-extract/main/docker-image-extract +$ chmod +x docker-image-extract +$ ./docker-image-extract bitwardenrs/server:alpine +Getting API token... +Getting image manifest for bitwardenrs/server:alpine... +Downloading layer 801bfaa63ef2094d770c809815b9e2b9c1194728e5e754ef7bc764030e140cea... +Extracting layer... +Downloading layer c6d331ed95271d8005dea195449ab4ef943017dc97ab134a4426faf441ae4fa6... +Extracting layer... +Downloading layer bfd9ec32f740ca8c86ccde057595d29a31eb093aafd7619fcdd4b956c7bf95e3... +Extracting layer... +Downloading layer e9bfb5d92e4629b1dcb4a13a470c90f51b9edde4e184d8520afc589728b8b675... +Extracting layer... +Downloading layer 5757963c858ce72bc4a1874f4971d326d21d2a844f03063a3c99e312150adf95... +Extracting layer... +Downloading layer f705bf64e4315fea1830cc137d1deda194e825da03bd7822e41ac52457bc83e7... +Extracting layer... +Downloading layer 909b5deb38cbce9f83598918bf7f38b7c2194d385456cf7ef15eff47f8a63108... +Extracting layer... +Downloading layer 8516f4cd818630cd60fa18254b072f8d9c3748bdb56f6e2527dc1c204e8e017c... +Extracting layer... +Image contents extracted into ./output. +$ ls -ld output/{bitwarden_rs,web-vault} +-rwx------ 1 user user 22054608 Feb 6 21:46 output/bitwarden_rs +drwx------ 8 user user 4096 Feb 6 21:46 output/web-vault/ +``` + +If you want the ARMv7 image, you currently have to download it by digest. + +Go to https://hub.docker.com/r/bitwardenrs/server/tags?name=alpine and find the entry for the `alpine` tag. +Click the partial digest for the `linux/arm/v7` image: + +![](https://i.imgur.com/T5WdwtS.png) + +This should bring you to a page that shows the full digest: + +![](https://i.imgur.com/Hsz8vJ4.png) + +Copy the full digest, and replace the `docker-image-extract bitwardenrs/server:alpine` command above with +`docker-image-extract bitwardenrs/server:`. + +For example: +``` +$ ./docker-image-extract bitwardenrs/server:sha256:ef129de113bec3409b6370c37a6e5573a1dacc051a3aae2a8a3339323ae63623 +``` \ No newline at end of file