forked from yao-pkg/pkg-fetch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.alpine
More file actions
47 lines (37 loc) · 878 Bytes
/
Dockerfile.alpine
File metadata and controls
47 lines (37 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM alpine:3.22 AS build
ARG PKG_FETCH_OPTION_a
ARG PKG_FETCH_OPTION_n
ARG PKG_FETCH_OPTION_p
WORKDIR /root/pkg-fetch/
RUN apk add --no-cache \
build-base \
git \
linux-headers \
npm \
python3 \
python3-dev \
yarn \
pkgconfig \
zlib-dev \
openssl-dev
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/8626
ENV CFLAGS=-U_FORTIFY_SOURCE
ENV CFLAGS_host=-U_FORTIFY_SOURCE
ENV CXXFLAGS=-U_FORTIFY_SOURCE
ENV CXXFLAGS_host=-U_FORTIFY_SOURCE
ENV CC=gcc
ENV CXX=g++
ENV AR=ar
ENV NM=nm
ENV READELF=readelf
ENV STRIP=strip
ENV CC_host=gcc
ENV CXX_host=g++
ENV AR_host=ar
ENV NM_host=nm
ENV READELF_host=readelf
COPY . ./
RUN yarn install --ignore-engines
RUN yarn start --arch $PKG_FETCH_OPTION_a --node-range $PKG_FETCH_OPTION_n --platform $PKG_FETCH_OPTION_p --output dist
FROM scratch
COPY --from=build /root/pkg-fetch/dist /