Skip to content

Commit

Permalink
try to fix build issues #1
Browse files Browse the repository at this point in the history
  • Loading branch information
cars10 committed Jan 14, 2025
1 parent 04371a1 commit b879f3c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
### LINUX

- name: linux > build
run: make TAURI_SIGNING_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}" TAURI_SIGNING_PRIVATE_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}" build_docker_tauri
run: make TAURI_SIGNING_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}" TAURI_SIGNING_PRIVATE_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}" DOCKER_USERID=1001 build_docker_tauri
if: matrix.platform == 'ubuntu-latest'

- name: linux > upload artifacts
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- uses: actions/checkout@v4

- name: build extensions
run: make build_browser_extensions
run: make DOCKER_USERID=1001 build_browser_extensions

- name: upload artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 1.3.0
## 1.3.1

Change the build process for the linux desktop app. It now requires glibc `3.35`, so it should run distros using
older versions of glibc, like `debian:bookworm` or `ubuntu:jammy`.
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CI ?=
TAURI_SIGNING_PRIVATE_KEY ?=
TAURI_SIGNING_PRIVATE_KEY_PASSWORD ?=
DOCKER_USERID ?= 1000

build_docker_ci:
docker build -f docker/Dockerfile_ci -t elasticvue-ci .
Expand All @@ -12,7 +13,7 @@ build_tauri:
yarn tauri:build

build_docker_tauri:
docker build . -t elasticvue-linux-tauri -f docker/Dockerfile_tauri
docker build -t elasticvue-linux-tauri -f docker/Dockerfile_tauri --build-arg USERID="$(DOCKER_USERID)" .
docker run --rm -e TAURI_SIGNING_PRIVATE_KEY="$(TAURI_SIGNING_PRIVATE_KEY)" \
-e TAURI_SIGNING_PRIVATE_KEY_PASSWORD="$(TAURI_SIGNING_PRIVATE_KEY_PASSWORD)" \
-v .:/app \
Expand All @@ -29,7 +30,7 @@ build_docker_nginx_multiarch:
# Build elasticvue browser extensions into ./artifacts via docker
build_browser_extensions:
mkdir -p "$(CURDIR)/artifacts"
docker build -f docker/Dockerfile_browser_ext -t elasticvue-build_browser_ext .
docker build -f docker/Dockerfile_browser_ext -t elasticvue-build_browser_ext --build-arg USERID="$(DOCKER_USERID)" .
docker run --rm -v "$(CURDIR)/artifacts":/app/artifacts elasticvue-build_browser_ext scripts/build_browser_extensions.sh

run_docker_nginx:
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile_browser_ext
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:22.5.1-bookworm
ARG USERID=1000

RUN apt-get update -qq \
&& apt-get upgrade -y \
Expand All @@ -20,7 +21,7 @@ COPY yarn.lock .
RUN yarn install
COPY . .

RUN chown -R 1000:1000 /app
USER 1000
RUN chown -R $USERID:$USERID /app
USER $USERID

ENTRYPOINT ["/bin/bash"]
5 changes: 3 additions & 2 deletions docker/Dockerfile_tauri
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM ubuntu:jammy
ARG USERID=1000

ENV NODE_VERSION=22
ENV APP_HOME=/app
ENV BUILD_USER=tauri

RUN useradd --uid 1000 -m $BUILD_USER
RUN useradd --uid $USERID -m $BUILD_USER
RUN mkdir -p $APP_HOME
RUN chown -R 1000:1000 $APP_HOME
RUN chown -R $USERID:$USERID $APP_HOME

WORKDIR $APP_HOME

Expand Down

0 comments on commit b879f3c

Please sign in to comment.