-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3bc681
commit fd873ed
Showing
3 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
ARG UBUNTU_VERSION=bionic | ||
FROM ubuntu:${UBUNTU_VERSION} AS build | ||
|
||
ARG NODE_VERSION=16.20.1 | ||
# Possible values: s390x, arm64, x64 | ||
ARG NODE_ARCH | ||
ADD https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.gz / | ||
RUN mkdir -p /nodejs && tar -xzf /node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.gz --strip-components=1 -C /nodejs | ||
ENV PATH=$PATH:/nodejs/bin | ||
|
||
WORKDIR /zstd | ||
COPY . . | ||
|
||
RUN apt-get -qq update && apt-get -qq install -y python3 build-essential curl cmake && ldd --version | ||
|
||
RUN npm run install-zstd && npm install | ||
|
||
ARG RUN_TEST | ||
RUN [ -n "$RUN_TEST" ] && npm test || echo 'skipping testing!' | ||
|
||
FROM scratch | ||
|
||
COPY --from=build /zstd/prebuilds/ / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
ARG PLATFORM=amd64 | ||
ARG NODE_VERSION=16.20.1 | ||
|
||
FROM ${PLATFORM}/node:${NODE_VERSION}-alpine AS node | ||
|
||
WORKDIR /zstd | ||
COPY . . | ||
|
||
RUN apk --no-cache add make g++ libc-dev curl bash python3 py3-pip vim cmake | ||
RUN npm run install-zstd && npm i | ||
|
||
ARG RUN_TEST | ||
RUN [ -n "$RUN_TEST" ] && npm test || echo 'skipping testing!' | ||
|
||
FROM scratch | ||
|
||
COPY --from=build /zstd/prebuilds/ / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters