[PR #734] [MERGED] Add npm commands to build local docker containers #3405

Closed
opened 2026-04-25 00:15:31 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/734
Author: @jmt-gh
Created: 6/16/2022
Status: Merged
Merged: 6/17/2022
Merged by: @advplyr

Base: masterHead: add_local_docker_build_commands


📝 Commits (1)

  • 167df85 add npm commands to build local docker containers

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 package.json (+3 -0)

📄 Description

I wanted to spin up a local instance of ABS with the latest changes, so I added a few local build options for docker. --load . will automatically load the image in to your local docker image repo after building

✔≻ npm run docker-amd64-local

> audiobookshelf@2.0.21 docker-amd64-local
> docker buildx build --platform linux/amd64 --load .  -t advplyr/audiobookshelf-amd64-local

[+] Building 2.0s (16/16) FINISHED                                                                                                                                                           
 => [internal] load .dockerignore                                                                                                                                                       0.0s
 => => transferring context: 189B                                                                                                                                                       0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                    0.1s
 => => transferring dockerfile: 636B                                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/node:16-alpine                                                                                                                       0.8s
 => [build 1/5] FROM docker.io/library/node:16-alpine@sha256:c785e617c8d7015190c0d41af52cc69be8a16e3d9eb7cb21f0bb58bcfca14d6b                                                           0.0s
 => => resolve docker.io/library/node:16-alpine@sha256:c785e617c8d7015190c0d41af52cc69be8a16e3d9eb7cb21f0bb58bcfca14d6b                                                                 0.0s
 => [internal] load build context                                                                                                                                                       0.8s
 => => transferring context: 3.42MB                                                                                                                                                     0.7s
 => CACHED [stage-1 2/6] RUN apk update &&     apk add --no-cache --update     curl     tzdata     ffmpeg                                                                               0.0s
 => CACHED [build 2/5] WORKDIR /client                                                                                                                                                  0.0s
 => CACHED [build 3/5] COPY /client /client                                                                                                                                             0.0s
 => CACHED [build 4/5] RUN npm ci && npm cache clean --force                                                                                                                            0.0s
 => CACHED [build 5/5] RUN npm run generate                                                                                                                                             0.0s
 => CACHED [stage-1 3/6] COPY --from=build /client/dist /client/dist                                                                                                                    0.0s
 => CACHED [stage-1 4/6] COPY index.js package* /                                                                                                                                       0.0s
 => CACHED [stage-1 5/6] COPY server server                                                                                                                                             0.0s
 => CACHED [stage-1 6/6] RUN npm ci --only=production                                                                                                                                   0.0s
 => exporting to oci image format                                                                                                                                                       0.4s
 => => exporting layers                                                                                                                                                                 0.0s
 => => exporting manifest sha256:beded098fed9ef6be54664e0fe98a06f2977ff804914d28fac9d8986231b02ff                                                                                       0.0s
 => => exporting config sha256:cc555a23f74dc0c353227f778682b867c3d75ef308a28727b2c83da1de48450e                                                                                         0.0s
 => => sending tarball                                                                                                                                                                  0.3s
 => importing to docker                                                                                                                                                                 0.0s

Local image:

✔≻ docker images
REPOSITORY                           TAG               IMAGE ID       CREATED         SIZE
advplyr/audiobookshelf-amd64-local   latest            cc555a23f74d   4 minutes ago   250MB

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/734 **Author:** [@jmt-gh](https://github.com/jmt-gh) **Created:** 6/16/2022 **Status:** ✅ Merged **Merged:** 6/17/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `add_local_docker_build_commands` --- ### 📝 Commits (1) - [`167df85`](https://github.com/advplyr/audiobookshelf/commit/167df85c1e1cef66189163244601f738dfa40a0b) add npm commands to build local docker containers ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `package.json` (+3 -0) </details> ### 📄 Description I wanted to spin up a local instance of ABS with the latest changes, so I added a few local build options for docker. `--load .` will automatically load the image in to your local docker image repo after building ``` ✔≻ npm run docker-amd64-local > audiobookshelf@2.0.21 docker-amd64-local > docker buildx build --platform linux/amd64 --load . -t advplyr/audiobookshelf-amd64-local [+] Building 2.0s (16/16) FINISHED => [internal] load .dockerignore 0.0s => => transferring context: 189B 0.0s => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 636B 0.0s => [internal] load metadata for docker.io/library/node:16-alpine 0.8s => [build 1/5] FROM docker.io/library/node:16-alpine@sha256:c785e617c8d7015190c0d41af52cc69be8a16e3d9eb7cb21f0bb58bcfca14d6b 0.0s => => resolve docker.io/library/node:16-alpine@sha256:c785e617c8d7015190c0d41af52cc69be8a16e3d9eb7cb21f0bb58bcfca14d6b 0.0s => [internal] load build context 0.8s => => transferring context: 3.42MB 0.7s => CACHED [stage-1 2/6] RUN apk update && apk add --no-cache --update curl tzdata ffmpeg 0.0s => CACHED [build 2/5] WORKDIR /client 0.0s => CACHED [build 3/5] COPY /client /client 0.0s => CACHED [build 4/5] RUN npm ci && npm cache clean --force 0.0s => CACHED [build 5/5] RUN npm run generate 0.0s => CACHED [stage-1 3/6] COPY --from=build /client/dist /client/dist 0.0s => CACHED [stage-1 4/6] COPY index.js package* / 0.0s => CACHED [stage-1 5/6] COPY server server 0.0s => CACHED [stage-1 6/6] RUN npm ci --only=production 0.0s => exporting to oci image format 0.4s => => exporting layers 0.0s => => exporting manifest sha256:beded098fed9ef6be54664e0fe98a06f2977ff804914d28fac9d8986231b02ff 0.0s => => exporting config sha256:cc555a23f74dc0c353227f778682b867c3d75ef308a28727b2c83da1de48450e 0.0s => => sending tarball 0.3s => importing to docker 0.0s ``` Local image: ``` ✔≻ docker images REPOSITORY TAG IMAGE ID CREATED SIZE advplyr/audiobookshelf-amd64-local latest cc555a23f74d 4 minutes ago 250MB ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:15:31 +02:00
adam closed this issue 2026-04-25 00:15:31 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3405