forked from vercel/pkg-fetch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.alpine
39 lines (28 loc) · 865 Bytes
/
Dockerfile.alpine
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
ARG HOST_ARCH=x86_64
ARG TARGET_TRIPLE=aarch64-linux-musl
FROM muslcc/$HOST_ARCH:$TARGET_TRIPLE
ARG PKG_FETCH_OPTION_a
ARG PKG_FETCH_OPTION_n
ARG PKG_FETCH_OPTION_p
USER root:root
WORKDIR /root/pkg-fetch/
RUN apk add --no-cache build-base git linux-headers npm python3 yarn
# 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=/bin/gcc
ENV CXX=/bin/g++
ENV AR=/bin/ar
ENV NM=/bin/nm
ENV READELF=/bin/readelf
ENV STRIP=/bin/strip
ENV CC_host=/usr/bin/gcc
ENV CXX_host=/usr/bin/g++
ENV AR_host=/usr/bin/ar
ENV NM_host=/usr/bin/nm
ENV READELF_host=/usr/bin/readelf
COPY . ./
RUN yarn install
RUN yarn start --arch $PKG_FETCH_OPTION_a --node-range $PKG_FETCH_OPTION_n --platform $PKG_FETCH_OPTION_p --output dist