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
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
NODE_VERSION 18.16.0
ENV
RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN
apt-get update
;
\
RUN
ARCH
=
&&
dpkgArch
=
"
$(
dpkg
--print-architecture
)
"
\
apt-get
install
-y
--no-install-recommends
\
&&
case
"
${
dpkgArch
##*-
}
"
in
\
ca-certificates
\
amd64
)
ARCH
=
'x64'
;;
\
gcc
\
ppc64el
)
ARCH
=
'ppc64le'
;;
\
libc6-dev
\
s390x
)
ARCH
=
's390x'
;;
\
wget
\
arm64
)
ARCH
=
'arm64'
;;
\
curl
\
armhf
)
ARCH
=
'armv7l'
;;
\
;
\
i386
)
ARCH
=
'x86'
;;
\
dpkgArch
=
"
$(
dpkg
--print-architecture
)
"
;
\
*
)
echo
"unsupported architecture"
;
exit
1
;;
\
case
"
${
dpkgArch
##*-
}
"
in
\
esac
\
amd64
)
rustArch
=
'x86_64-unknown-linux-gnu'
;
rustupSha256
=
'0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db'
;;
\
&&
set
-ex
\
armhf
)
rustArch
=
'armv7-unknown-linux-gnueabihf'
;
rustupSha256
=
'f21c44b01678c645d8fbba1e55e4180a01ac5af2d38bcbd14aa665e0d96ed69a'
;;
\
# libatomic1 for arm
arm64
)
rustArch
=
'aarch64-unknown-linux-gnu'
;
rustupSha256
=
'673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800'
;;
\
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \
i386
)
rustArch
=
'i686-unknown-linux-gnu'
;
rustupSha256
=
'e7b0f47557c1afcd86939b118cbcf7fb95a5d1d917bdd355157b63ca00fc4333'
;;
\
&& rm -rf /var/lib/apt/lists/* \
*
)
echo
>
&2
"unsupported architecture:
${
dpkgArch
}
"
;
exit
1
;;
\
&& for key in \
esac
;
\
4ED778F539E3634C779C87C6D7062848A1AB005C \
url
=
"https://static.rust-lang.org/rustup/archive/1.26.0/
${
rustArch
}
/rustup-init"
;
\
141F07595B7B3FFE74309A937405533BE57C7D57 \
wget
"
$url
"
;
\
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
echo
"
${
rustupSha256
}
*rustup-init"
|
sha256sum
-c
-
;
\
DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
chmod
+x rustup-init
;
\
61FC681DFB92A079F1685E77973F295594EC4689 \
./rustup-init
-y
--no-modify-path
--profile
minimal
--default-toolchain
$RUST_VERSION
--default-host
${
rustArch
}
;
\
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
rm
rustup-init
;
\
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
chmod
-R
a+w
$RUSTUP_HOME
$CARGO_HOME
;
\
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
rustup
--version
;
\
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
cargo
--version
;
\
108F52B48DB57BB0CC439B2997B01419BD92F80A \
rustc
--version
;
\
; do \
rm
-rf
/var/lib/apt/lists/
*
;
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
rustup target add wasm32-unknown-unknown
RUN
curl https://rustwasm.github.io/wasm-pack/installer/init.sh
-sSf
| bash
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