Repository navigation
ERROR: Service 'api' failed to build : Build failed #1287
Contact DetailsNo response What happened?I followed the guide to run the docker compose under Windows 11 Debian WSL2 Steps to Reproducegit clone What browsers are you seeing the problem on?No response Relevant log output=> [internal] load build context 0.0s
=> => transferring context: 56.98kB 0.0s
=> [1/5] FROM docker.io/library/node:19-alpine@sha256:8ec543d4795e2e85af924a24f8acb039792ae9fe8a42ad5b4bf4c277ab34b62e 0.0s
=> CACHED [2/5] COPY . /app 0.0s
=> CACHED [3/5] WORKDIR /app 0.0s
=> ERROR [4/5] RUN apk --no-cache add curl && touch .env && npm ci 10.2s
------
> [4/5] RUN apk --no-cache add curl && touch .env && npm ci:
0.195 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
5.201 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
5.201 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/main: temporary error (try again later)
10.21 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/community: temporary error (try again later)
10.21 ERROR: unable to select packages:
10.21 curl (no such package):
10.21 required by: world[curl]
------
Dockerfile:8
--------------------
7 | # Install call deps - Install curl for health check
8 | >>> RUN apk --no-cache add curl && \
9 | >>> # We want to inherit env from the container, not the file
10 | >>> # This will preserve any existing env file if it's already in source
11 | >>> # otherwise it will create a new one
12 | >>> touch .env && \
13 | >>> # Build deps in seperate
14 | >>> npm ci
15 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apk --no-cache add curl && touch .env && npm ci" did not complete successfully: exit code: 1
ERROR: Service 'api' failed to build : Build failed
|
Replies: 3 comments 4 replies
|
Try this order. Also unless you already configured your .env file as needed, # Stop the container (if running)
docker-compose down
# Fetch the latest changes from Github
git fetch origin
# Switch to the repo's main branch
git checkout main
# Pull the latest changes to the main branch from Github
git pull origin main
# Prune all LibreChat Docker images
docker rmi librechat:latest
# Remove all unused dangling Docker images
docker image prune -f
# Building a new LibreChat image
docker-compose build
# Start LibreChat
docker-compose upfrom: https://docs.librechat.ai/install/docker_compose_install.html#updating-librechat These steps worked for me perfect on Linux 5.10.16.3-microsoft-standard-WSL2 x86_64 x86_64 |
|
I'm getting the same issue on a Mac. (M1 Mac with 14.2.1 ) Tried the suggested order from the suggestion here but still got the same error. |
|
I'll add that I had issues on Windows 11 with a somewhat related docker build error, and it was resolved after updating Docker Desktop. If anyone has issues, it's worth trying that. |
Try this order.
Also unless you already configured your .env file as needed,
or you want to start over and delete .env file: do
cp .env.example .envnotcp .envfrom: https://docs.librechat.ai/install/docker_compose_install.html#updatin…