Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can`t build docker #4303

Open
3Cube3 opened this issue Jan 18, 2025 · 3 comments
Open

Can`t build docker #4303

3Cube3 opened this issue Jan 18, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@3Cube3
Copy link

3Cube3 commented Jan 18, 2025

Describe the bug

Can`t build docker container
try ubuntu 24.04 and debian 12

Steps to reproduce

docker build -t mymemos1 .

The version of Memos you're using

v0.23.0

Screenshots or additional context

# docker build -t mymemos1 .
[+] Building 27.2s (17/23)                                                                                              docker:default
 => [internal] load build definition from Dockerfile                                                                              0.0s
 => => transferring dockerfile: 939B                                                                                              0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                  0.4s
 => [internal] load metadata for docker.io/library/node:20-alpine                                                                 0.4s
 => [internal] load metadata for docker.io/library/golang:1.23-alpine                                                             0.4s
 => [internal] load .dockerignore                                                                                                 0.0s
 => => transferring context: 57B                                                                                                  0.0s
 => [frontend 1/6] FROM docker.io/library/node:20-alpine@sha256:24fb6aa7020d9a20b00d6da6d1714187c45ed00d1eb4adb01395843c338b9372  0.0s
 => [internal] load build context                                                                                                 0.3s
 => => transferring context: 37.77kB                                                                                              0.3s
 => [monolithic 1/6] FROM docker.io/library/alpine:latest@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed5109  0.0s
 => CACHED [monolithic 2/6] WORKDIR /usr/local/memos                                                                              0.0s
 => CACHED [monolithic 3/6] RUN apk add --no-cache tzdata                                                                         0.0s
 => [backend 1/5] FROM docker.io/library/golang:1.23-alpine@sha256:47d337594bd9e667d35514b241569f95fb6d95727c24b19468813d596d5ae  0.0s
 => CACHED [frontend 2/6] WORKDIR /frontend-build                                                                                 0.0s
 => CACHED [frontend 3/6] COPY . .                                                                                                0.0s
 => CACHED [frontend 4/6] WORKDIR /frontend-build/web                                                                             0.0s
 => CACHED [backend 2/5] WORKDIR /backend-build                                                                                   0.0s
 => CACHED [backend 3/5] COPY . .                                                                                                 0.0s
 => ERROR [frontend 5/6] RUN corepack enable && pnpm i --frozen-lockfile                                                         25.9s
------
 > [frontend 5/6] RUN corepack enable && pnpm i --frozen-lockfile:
1.356 ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.15.4.tgz
3.153 Lockfile is up to date, resolution step is skipped
3.368 Progress: resolved 1, reused 0, downloaded 0, added 0
3.614 Packages: +727
3.614 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4.376 Progress: resolved 727, reused 0, downloaded 6, added 0
5.378 Progress: resolved 727, reused 0, downloaded 61, added 48
6.379 Progress: resolved 727, reused 0, downloaded 105, added 90
7.381 Progress: resolved 727, reused 0, downloaded 128, added 115
8.386 Progress: resolved 727, reused 0, downloaded 208, added 201
9.391 Progress: resolved 727, reused 0, downloaded 223, added 215
10.39 Progress: resolved 727, reused 0, downloaded 235, added 220
11.39 Progress: resolved 727, reused 0, downloaded 303, added 289
12.39 Progress: resolved 727, reused 0, downloaded 366, added 355
13.40 Progress: resolved 727, reused 0, downloaded 413, added 402
14.41 Progress: resolved 727, reused 0, downloaded 423, added 412
15.41 Progress: resolved 727, reused 0, downloaded 428, added 413
16.41 Progress: resolved 727, reused 0, downloaded 445, added 429
17.41 Progress: resolved 727, reused 0, downloaded 528, added 513
18.41 Progress: resolved 727, reused 0, downloaded 565, added 553
19.42 Progress: resolved 727, reused 0, downloaded 610, added 597
20.42 Progress: resolved 727, reused 0, downloaded 683, added 673
21.42 Progress: resolved 727, reused 0, downloaded 705, added 692
22.40 Progress: resolved 727, reused 0, downloaded 727, added 727, done
23.39 .../node_modules/protobufjs postinstall$ node scripts/postinstall
23.45 .../[email protected]/node_modules/esbuild postinstall$ node install.js
23.46 .../node_modules/@bufbuild/buf postinstall$ node ./install.js
24.00 .../node_modules/protobufjs postinstall: Done
24.11 .../[email protected]/node_modules/esbuild postinstall: Done
24.36 .../node_modules/@bufbuild/buf postinstall: Done
24.84
24.84 dependencies:
24.84 + @dnd-kit/core 6.3.1
24.84 + @dnd-kit/sortable 8.0.0
24.84 + @dnd-kit/utilities 3.2.2
24.84 + @emotion/react 11.14.0
24.84 + @emotion/styled 11.14.0
24.84 + @github/relative-time-element 4.4.4
24.84 + @matejmazur/react-katex 3.1.3
24.84 + @mui/joy 5.0.0-beta.51
24.84 + @radix-ui/react-popover 1.1.4
24.84 + @reduxjs/toolkit 2.5.0
24.84 + @usememos/mui 0.0.1-alpha.26
24.84 + class-variance-authority 0.7.1
24.84 + clsx 2.1.1
24.84 + copy-to-clipboard 3.3.3
24.84 + dayjs 1.11.13
24.84 + fuse.js 7.0.0
24.84 + highlight.js 11.11.1
24.84 + i18next 24.2.0
24.84 + katex 0.16.19
24.84 + leaflet 1.9.4
24.84 + lodash-es 4.17.21
24.84 + lucide-react 0.453.0
24.84 + mermaid 11.4.1
24.84 + react 18.3.1
24.84 + react-datepicker 7.5.0
24.84 + react-dom 18.3.1
24.84 + react-force-graph-2d 1.26.1
24.84 + react-hot-toast 2.5.1
24.84 + react-i18next 15.4.0
24.84 + react-leaflet 4.2.1
24.84 + react-redux 9.2.0
24.84 + react-router-dom 7.1.1
24.84 + react-simple-pull-to-refresh 1.3.3
24.84 + react-use 17.6.0
24.84 + tailwind-merge 2.6.0
24.84 + tailwindcss 3.4.17
24.84 + tailwindcss-animate 1.0.7
24.84 + textarea-caret 3.1.0
24.84 + uuid 11.0.3
24.84 + zustand 5.0.2
24.84
24.84 devDependencies:
24.84 + @bufbuild/buf 1.48.0
24.84 + @bufbuild/protobuf 2.2.3
24.84 + @trivago/prettier-plugin-sort-imports 4.3.0
24.84 + @types/d3 7.4.3
24.84 + @types/katex 0.16.7
24.84 + @types/leaflet 1.9.15
24.84 + @types/lodash-es 4.17.12
24.84 + @types/node 22.10.3
24.84 + @types/qs 6.9.17
24.84 + @types/react 18.3.18
24.84 + @types/react-dom 18.3.5
24.84 + @types/textarea-caret 3.0.3
24.84 + @types/uuid 10.0.0
24.84 + @typescript-eslint/eslint-plugin 7.18.0
24.84 + @typescript-eslint/parser 7.18.0
24.84 + @vitejs/plugin-react 4.3.4
24.84 + autoprefixer 10.4.20
24.84 + code-inspector-plugin 0.18.3
24.84 + eslint 8.57.1
24.84 + eslint-config-prettier 9.1.0
24.84 + eslint-plugin-prettier 5.2.1
24.84 + eslint-plugin-react 7.37.3
24.84 + less 4.2.1
24.84 + long 5.2.3
24.84 + nice-grpc-web 3.3.5
24.84 + postcss 8.4.49
24.84 + prettier 3.4.2
24.84 + protobufjs 7.4.0
24.84 + typescript 5.7.2
24.84 + vite 6.0.6
24.84
24.88
24.88 > memos@ postinstall /frontend-build/web
24.88 > cd ../proto && buf generate
24.88
25.36 Failure: permission_denied: 403 Forbidden
25.39  ELIFECYCLE  Command failed with exit code 1.
------
Dockerfile:9
--------------------
   7 |     WORKDIR /frontend-build/web
   8 |
   9 | >>> RUN corepack enable && pnpm i --frozen-lockfile
  10 |
  11 |     RUN pnpm build
--------------------
ERROR: failed to solve: process "/bin/sh -c corepack enable && pnpm i --frozen-lockfile" did not complete successfully: exit code: 1
@3Cube3 3Cube3 added the bug Something isn't working label Jan 18, 2025
@fernandoonrails
Copy link

when I tried to replicate it ran just fine, could you give more details about your machine?

@3Cube3
Copy link
Author

3Cube3 commented Jan 21, 2025

win11 LTSC docker-desktop 4.37.1
on latest proxmox fresh os debian 12.7.1 witch req. software Go, Air, Node.js, pnpm, latest docker in os
on pay VPS ubuntu 22.04 witch req. software Go, Air, Node.js, pnpm, latest docker

I`am newbie with docker. Maybe i doing some wrong with build docker container, but i try compile other docker software container and its bulds fine.

@fernandoonrails
Copy link

there seems like the ELIFECYCLE error has been showing to you, for what I've searched about it, it could be

Incorrect Package Version: If the package version is incorrect, it can cause an error.
Corrupted Package Metadata: If the package metadata is corrupt or missing, it can cause errors.
I'd say you should try running the docker builder prune, it'll remove the build cache, try running it first and see if it works.

If it doesn't, please come back and say if the error stays the same

If you want to just self host it, you can also, run the command

docker run -d \
  --init \
  --name memos \
  --publish 5230:5230 \
  --volume ~/.memos/:/var/opt/memos \
  neosmemo/memos:stable

or with a more declarative approach with docker compose using

services:
  memos:
    image: neosmemo/memos:stable
    container_name: memos
    volumes:
      - ~/.memos/:/var/opt/memos
    ports:
      - 5230:5230

and then running docker compose up -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants