mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-06 02:18:26 +02:00
Fix docker build
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM node:20-alpine AS node-build
|
FROM node:18-alpine AS node-build
|
||||||
WORKDIR /etc/linkding
|
WORKDIR /etc/linkding
|
||||||
# install build dependencies
|
# install build dependencies
|
||||||
COPY rollup.config.mjs package.json package-lock.json ./
|
COPY rollup.config.mjs package.json package-lock.json ./
|
||||||
@@ -9,8 +9,14 @@ COPY bookmarks/frontend ./bookmarks/frontend
|
|||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.10.13-alpine3.18 AS python-base
|
# Use 3.11 for now, as django4-background-tasks doesn't work with 3.12 yet
|
||||||
RUN apk update && apk add alpine-sdk linux-headers libpq-dev pkgconfig icu-dev sqlite-dev
|
FROM python:3.11.8-alpine3.19 AS python-base
|
||||||
|
# Add required packages
|
||||||
|
# alpine-sdk linux-headers pkgconfig: build Python packages from source
|
||||||
|
# libpq-dev: build Postgres client from source
|
||||||
|
# icu-dev sqlite-dev: build Sqlite ICU extension
|
||||||
|
# libffi-dev openssl-dev rust cargo: build Python cryptography from source
|
||||||
|
RUN apk update && apk add alpine-sdk linux-headers libpq-dev pkgconfig icu-dev sqlite-dev libffi-dev openssl-dev rust cargo
|
||||||
WORKDIR /etc/linkding
|
WORKDIR /etc/linkding
|
||||||
|
|
||||||
|
|
||||||
@@ -32,7 +38,7 @@ RUN python manage.py compilescss && \
|
|||||||
|
|
||||||
FROM python-base AS prod-deps
|
FROM python-base AS prod-deps
|
||||||
COPY requirements.txt ./requirements.txt
|
COPY requirements.txt ./requirements.txt
|
||||||
# replace psycopg2-binary with psycopg2
|
# Need to build psycopg2 from source for ARM platforms
|
||||||
RUN sed -i 's/psycopg2-binary/psycopg2/g' requirements.txt
|
RUN sed -i 's/psycopg2-binary/psycopg2/g' requirements.txt
|
||||||
RUN mkdir /opt/venv && \
|
RUN mkdir /opt/venv && \
|
||||||
python -m venv --upgrade-deps --copies /opt/venv && \
|
python -m venv --upgrade-deps --copies /opt/venv && \
|
||||||
@@ -61,9 +67,9 @@ RUN wget https://www.sqlite.org/${SQLITE_RELEASE_YEAR}/sqlite-amalgamation-${SQL
|
|||||||
gcc -fPIC -shared icu.c `pkg-config --libs --cflags icu-uc icu-io` -o libicu.so
|
gcc -fPIC -shared icu.c `pkg-config --libs --cflags icu-uc icu-io` -o libicu.so
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.10.13-alpine3.18 AS final
|
FROM python:3.11.8-alpine3.19 AS final
|
||||||
# install runtime dependencies
|
# install runtime dependencies
|
||||||
RUN apk update && apk add bash curl icu libpq mailcap
|
RUN apk update && apk add bash curl icu libpq mailcap libssl3
|
||||||
# create www-data user and group
|
# create www-data user and group
|
||||||
RUN set -x ; \
|
RUN set -x ; \
|
||||||
addgroup -g 82 -S www-data ; \
|
addgroup -g 82 -S www-data ; \
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
FROM node:20-alpine AS node-build
|
FROM node:18-alpine AS node-build
|
||||||
WORKDIR /etc/linkding
|
WORKDIR /etc/linkding
|
||||||
# install build dependencies
|
# install build dependencies
|
||||||
COPY rollup.config.mjs package.json package-lock.json ./
|
COPY rollup.config.mjs package.json package-lock.json ./
|
||||||
@@ -9,8 +9,16 @@ COPY bookmarks/frontend ./bookmarks/frontend
|
|||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.10.6-slim-buster AS python-base
|
# Use 3.11 for now, as django4-background-tasks doesn't work with 3.12 yet
|
||||||
RUN apt-get update && apt-get -y install build-essential libpq-dev
|
FROM python:3.11.8-slim-bookworm AS python-base
|
||||||
|
# Add required packages
|
||||||
|
# build-essential pkg-config: build Python packages from source
|
||||||
|
# libpq-dev: build Postgres client from source
|
||||||
|
# libicu-dev libsqlite3-dev: build Sqlite ICU extension
|
||||||
|
# llibffi-dev libssl-dev curl rustup: build Python cryptography from source
|
||||||
|
RUN apt-get update && apt-get -y install build-essential pkg-config libpq-dev libicu-dev libsqlite3-dev wget unzip libffi-dev libssl-dev curl
|
||||||
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
WORKDIR /etc/linkding
|
WORKDIR /etc/linkding
|
||||||
|
|
||||||
|
|
||||||
@@ -32,7 +40,7 @@ RUN python manage.py compilescss && \
|
|||||||
|
|
||||||
FROM python-base AS prod-deps
|
FROM python-base AS prod-deps
|
||||||
COPY requirements.txt ./requirements.txt
|
COPY requirements.txt ./requirements.txt
|
||||||
# replace psycopg2-binary with psycopg2
|
# Need to build psycopg2 from source for ARM platforms
|
||||||
RUN sed -i 's/psycopg2-binary/psycopg2/g' requirements.txt
|
RUN sed -i 's/psycopg2-binary/psycopg2/g' requirements.txt
|
||||||
RUN mkdir /opt/venv && \
|
RUN mkdir /opt/venv && \
|
||||||
python -m venv --upgrade-deps --copies /opt/venv && \
|
python -m venv --upgrade-deps --copies /opt/venv && \
|
||||||
@@ -41,9 +49,6 @@ RUN mkdir /opt/venv && \
|
|||||||
|
|
||||||
|
|
||||||
FROM python-base AS compile-icu
|
FROM python-base AS compile-icu
|
||||||
RUN apt-get update && apt-get -y install libicu-dev libsqlite3-dev wget unzip
|
|
||||||
WORKDIR /etc/linkding
|
|
||||||
|
|
||||||
# Defines SQLite version
|
# Defines SQLite version
|
||||||
# Since this is only needed for downloading the header files this probably
|
# Since this is only needed for downloading the header files this probably
|
||||||
# doesn't need to be up-to-date, assuming the SQLite APIs used by the ICU
|
# doesn't need to be up-to-date, assuming the SQLite APIs used by the ICU
|
||||||
@@ -64,8 +69,8 @@ RUN wget https://www.sqlite.org/${SQLITE_RELEASE_YEAR}/sqlite-amalgamation-${SQL
|
|||||||
gcc -fPIC -shared icu.c `pkg-config --libs --cflags icu-uc icu-io` -o libicu.so
|
gcc -fPIC -shared icu.c `pkg-config --libs --cflags icu-uc icu-io` -o libicu.so
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.10.6-slim-buster as final
|
FROM python:3.11.8-slim-bookworm as final
|
||||||
RUN apt-get update && apt-get -y install mime-support libpq-dev libicu-dev curl
|
RUN apt-get update && apt-get -y install mime-support libpq-dev libicu-dev libssl3 curl
|
||||||
WORKDIR /etc/linkding
|
WORKDIR /etc/linkding
|
||||||
# copy prod dependencies
|
# copy prod dependencies
|
||||||
COPY --from=prod-deps /opt/venv /opt/venv
|
COPY --from=prod-deps /opt/venv /opt/venv
|
||||||
|
64
package-lock.json
generated
64
package-lock.json
generated
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "linkding",
|
"name": "linkding",
|
||||||
"version": "1.24.2",
|
"version": "1.25.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "linkding",
|
"name": "linkding",
|
||||||
"version": "1.24.2",
|
"version": "1.25.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
"rollup": "^4.13.0",
|
"@rollup/wasm-node": "^4.13.0",
|
||||||
"rollup-plugin-svelte": "^7.2.0",
|
"rollup-plugin-svelte": "^7.2.0",
|
||||||
"spectre.css": "^0.5.8",
|
"spectre.css": "^0.5.8",
|
||||||
"svelte": "^4.0.0"
|
"svelte": "^4.0.0"
|
||||||
@@ -160,7 +160,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm64": {
|
"node_modules/@rollup/rollup-android-arm64": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -172,7 +173,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -184,7 +186,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-x64": {
|
"node_modules/@rollup/rollup-darwin-x64": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -196,7 +199,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -208,7 +212,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -220,7 +225,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -232,7 +238,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -244,7 +251,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -256,7 +264,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -268,7 +277,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -280,7 +290,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -292,7 +303,8 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
@@ -304,7 +316,26 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
]
|
],
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@rollup/wasm-node": {
|
||||||
|
"version": "4.13.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.13.0.tgz",
|
||||||
|
"integrity": "sha512-oFX11wzU7RTaiW06WBtRpzIVN/oaG0I3XkevNO0brBklYnY9zpLhTfksN4b+TdBt6CfXV/KdVhdWLbb0fQIR7A==",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/estree": "1.0.5"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"rollup": "dist/bin/rollup"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0",
|
||||||
|
"npm": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"fsevents": "~2.3.2"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/estree": {
|
"node_modules/@types/estree": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
@@ -593,6 +624,7 @@
|
|||||||
"version": "4.13.0",
|
"version": "4.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz",
|
||||||
"integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==",
|
"integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/estree": "1.0.5"
|
"@types/estree": "1.0.5"
|
||||||
},
|
},
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
"rollup": "^4.13.0",
|
"@rollup/wasm-node": "^4.13.0",
|
||||||
"rollup-plugin-svelte": "^7.2.0",
|
"rollup-plugin-svelte": "^7.2.0",
|
||||||
"spectre.css": "^0.5.8",
|
"spectre.css": "^0.5.8",
|
||||||
"svelte": "^4.0.0"
|
"svelte": "^4.0.0"
|
||||||
|
Reference in New Issue
Block a user