Skip to content

Commit 5959d05

Browse files
authored
Fix arm build (#302)
* WIP. * WIP. * WIP.
1 parent 92ad202 commit 5959d05

File tree

2 files changed

+56
-17
lines changed

2 files changed

+56
-17
lines changed

.docker/base/Dockerfile.arm

+21-17
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,27 @@ RUN ./build
3232
#
3333
# STAGE 2: CLIENT
3434
#
35-
FROM node:18-bullseye-slim as client
36-
37-
# install dependencies
38-
RUN set -eux; apt-get update; \
39-
apt-get install -y --no-install-recommends python2 build-essential
40-
41-
WORKDIR /src
42-
4335
#
44-
# install dependencies
45-
COPY client/package*.json ./
46-
RUN npm install
47-
36+
# Because client builds fail in Github Actions, therefor we build it outside of Docker.
37+
#
38+
# FROM node:18-bullseye-slim as client
39+
#
40+
# # install dependencies
41+
# RUN set -eux; apt-get update; \
42+
# apt-get install -y --no-install-recommends python2 build-essential
43+
#
44+
# WORKDIR /src
45+
#
46+
# #
47+
# # install dependencies
48+
# COPY client/package*.json ./
49+
# RUN npm install
50+
#
51+
# #
52+
# # build client
53+
# COPY client/ .
54+
# RUN npm run build
4855
#
49-
# build client
50-
COPY client/ .
51-
RUN npm run build
52-
5356
#
5457
# STAGE 3: RUNTIME
5558
#
@@ -134,7 +137,8 @@ ENV NEKO_BIND=:8080
134137
#
135138
# copy static files from previous stages
136139
COPY --from=server /src/bin/neko /usr/bin/neko
137-
COPY --from=client /src/dist/ /var/www
140+
# COPY --from=client /src/dist/ /var/www
141+
COPY client/dist/ /var/www
138142

139143
HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
140144
CMD wget -O - http://localhost:${NEKO_BIND#*:}/health || exit 1

.github/workflows/ghcr-arm.yml

+35
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,51 @@ env:
1313
PLATFORMS: linux/arm64,linux/arm/v7
1414

1515
jobs:
16+
build-client:
17+
runs-on: ubuntu-latest
18+
#
19+
# do not run on forks
20+
#
21+
if: github.repository_owner == 'm1k1o'
22+
steps:
23+
-
24+
name: Checkout
25+
uses: actions/checkout@v2
26+
-
27+
name: Set up node
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: 18.x
31+
-
32+
name: Build client
33+
run: |
34+
cd client
35+
npm install
36+
npm run build
37+
-
38+
name: Upload client dist
39+
uses: actions/upload-artifact@v3
40+
with:
41+
name: client-dist
42+
path: client/dist
43+
1644
build-base:
1745
runs-on: ubuntu-latest
1846
#
1947
# do not run on forks
2048
#
2149
if: github.repository_owner == 'm1k1o'
50+
needs: [ build-client ]
2251
steps:
2352
-
2453
name: Checkout
2554
uses: actions/checkout@v2
55+
-
56+
name: Download client dist
57+
uses: actions/download-artifact@v3
58+
with:
59+
name: client-dist
60+
path: client/dist
2661
-
2762
name: Set up QEMU
2863
uses: docker/setup-qemu-action@v1

0 commit comments

Comments
 (0)