Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rust CI Builder
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microhacks
Rust CI Builder
Commits
212648bb
Verified
Commit
212648bb
authored
2 years ago
by
Louis
Browse files
Options
Downloads
Patches
Plain Diff
Invert rust/node relation
parent
827beb4e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#478
passed with stage
in 1 minute and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+50
-34
50 additions, 34 deletions
Dockerfile
with
50 additions
and
34 deletions
Dockerfile
+
50
−
34
View file @
212648bb
FROM
node:18
FROM
rust:1.69-slim
ARG
RUST_VERSION=1.69.0
ENV
RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
ENV
NODE_VERSION 18.16.0
RUN
apt-get update
;
\
apt-get
install
-y
--no-install-recommends
\
ca-certificates
\
gcc
\
libc6-dev
\
wget
\
curl
\
;
\
dpkgArch
=
"
$(
dpkg
--print-architecture
)
"
;
\
case
"
${
dpkgArch
##*-
}
"
in
\
amd64
)
rustArch
=
'x86_64-unknown-linux-gnu'
;
rustupSha256
=
'0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db'
;;
\
armhf
)
rustArch
=
'armv7-unknown-linux-gnueabihf'
;
rustupSha256
=
'f21c44b01678c645d8fbba1e55e4180a01ac5af2d38bcbd14aa665e0d96ed69a'
;;
\
arm64
)
rustArch
=
'aarch64-unknown-linux-gnu'
;
rustupSha256
=
'673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800'
;;
\
i386
)
rustArch
=
'i686-unknown-linux-gnu'
;
rustupSha256
=
'e7b0f47557c1afcd86939b118cbcf7fb95a5d1d917bdd355157b63ca00fc4333'
;;
\
*
)
echo
>
&2
"unsupported architecture:
${
dpkgArch
}
"
;
exit
1
;;
\
esac
;
\
url
=
"https://static.rust-lang.org/rustup/archive/1.26.0/
${
rustArch
}
/rustup-init"
;
\
wget
"
$url
"
;
\
echo
"
${
rustupSha256
}
*rustup-init"
|
sha256sum
-c
-
;
\
chmod
+x rustup-init
;
\
./rustup-init
-y
--no-modify-path
--profile
minimal
--default-toolchain
$RUST_VERSION
--default-host
${
rustArch
}
;
\
rm
rustup-init
;
\
chmod
-R
a+w
$RUSTUP_HOME
$CARGO_HOME
;
\
rustup
--version
;
\
cargo
--version
;
\
rustc
--version
;
\
rm
-rf
/var/lib/apt/lists/
*
;
RUN
ARCH
=
&&
dpkgArch
=
"
$(
dpkg
--print-architecture
)
"
\
&&
case
"
${
dpkgArch
##*-
}
"
in
\
amd64
)
ARCH
=
'x64'
;;
\
ppc64el
)
ARCH
=
'ppc64le'
;;
\
s390x
)
ARCH
=
's390x'
;;
\
arm64
)
ARCH
=
'arm64'
;;
\
armhf
)
ARCH
=
'armv7l'
;;
\
i386
)
ARCH
=
'x86'
;;
\
*
)
echo
"unsupported architecture"
;
exit
1
;;
\
esac
\
&&
set
-ex
\
# libatomic1 for arm
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
141F07595B7B3FFE74309A937405533BE57C7D57 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
61FC681DFB92A079F1685E77973F295594EC4689 \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
; do \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
# && apt-mark auto '.*' > /dev/null \
# && find /usr/local -type f -executable -exec ldd '{}' ';' \
# | awk '/=>/ { print $(NF-1) }' \
# | sort -u \
# | xargs -r dpkg-query --search \
# | cut -d: -f1 \
# | sort -u \
# | xargs -r apt-mark manual \
# && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
# smoke tests
&& node --version \
&& npm --version
RUN
rustup target add wasm32-unknown-unknown
RUN
curl https://rustwasm.github.io/wasm-pack/installer/init.sh
-sSf
| bash
ENTRYPOINT
["/bin/bash", "-c"]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment