Merge nucleic/sleek-thistle-egret-fyej into dev
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
FROM ubuntu:latest
|
||||
|
||||
ARG USERNAME=devel
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=$USER_UID
|
||||
|
||||
# Install basic utilities and prerequisites.
|
||||
# bash-completion - for completion testing
|
||||
# bsdmainutils - provides hexdump, used by integration tests
|
||||
# neovim - for convenience and modern editing
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y \
|
||||
bash \
|
||||
bash-completion \
|
||||
bsdmainutils \
|
||||
build-essential \
|
||||
curl \
|
||||
git \
|
||||
iputils-ping \
|
||||
language-pack-en \
|
||||
neovim \
|
||||
sed \
|
||||
sudo \
|
||||
wget
|
||||
|
||||
# Install gh cli
|
||||
# Reference: https://github.com/cli/cli/blob/trunk/docs/install_linux.md
|
||||
RUN mkdir -p -m 755 /etc/apt/keyrings && \
|
||||
wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \
|
||||
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && \
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gh
|
||||
|
||||
# Add a non-root user that we'll do our best to use for development.
|
||||
RUN userdel ubuntu && \
|
||||
groupadd --gid $USER_GID $USERNAME && \
|
||||
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \
|
||||
echo "devel ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
||||
# Switch to user.
|
||||
USER devel
|
||||
|
||||
# Set up path to include rust components.
|
||||
ENV PATH="${PATH}:/home/devel/.cargo/bin"
|
||||
|
||||
# Copy scripts to temp dir.
|
||||
WORKDIR /tmp
|
||||
|
||||
# Install rust toolchain and cargo tools.
|
||||
COPY install-rust-tools.sh .
|
||||
RUN ./install-rust-tools.sh
|
||||
|
||||
# Switch back to home dir for normal usage.
|
||||
WORKDIR /home/devel
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"build": {
|
||||
"dockerfile": "./Dockerfile",
|
||||
"context": "."
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"rust-lang.rust-analyzer",
|
||||
"tamasfe.even-better-toml"
|
||||
]
|
||||
}
|
||||
},
|
||||
"features": {},
|
||||
"remoteUser": "devel",
|
||||
"updateRemoteUserUID": true
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Install rustup and needed components
|
||||
# Reference: https://rustup.rs/
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
rustup component add llvm-tools-preview
|
||||
|
||||
# Install cargo binstall
|
||||
# Reference: https://github.com/cargo-bins/cargo-binstall
|
||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
|
||||
# Install cargo tools using binstall
|
||||
cargo binstall --no-confirm cargo-audit
|
||||
cargo binstall --no-confirm cargo-deny
|
||||
# cargo binstall --no-confirm cargo-flamegraph
|
||||
cargo binstall --no-confirm cargo-llvm-cov
|
||||
cargo binstall --no-confirm cargo-nextest
|
||||
Reference in New Issue
Block a user