replaced dev container Dockerfile with one which uses Ubuntu instead of Alpine. The Docker in Docker feature only works on Ubuntu, not Debian or Alpine, and the LLDB extension to enable debugging only supports Debian/Ubuntu
57 lines
2.3 KiB
Docker
57 lines
2.3 KiB
Docker
# Copyright (C) 2023 Andrew Rioux
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
FROM ubuntu:22.04
|
|
|
|
ARG USERNAME=vscode
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive \
|
|
RUSTUP_HOME=/usr/local/rustup \
|
|
CARGO_HOME=/usr/local/cargo \
|
|
PATH=/usr/local/cargo/bin:$PATH:/home/vscode/.cargo/bin
|
|
|
|
RUN apt-get update && \
|
|
apt install -y git libtool valgrind docker-compose lldb sudo zsh wget && \
|
|
apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* && \
|
|
adduser ${USERNAME} && \
|
|
echo "$USERNAME ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers && \
|
|
chsh -s /usr/bin/zsh ${USERNAME} && \
|
|
wget https://static.rust-lang.org/rustup/archive/1.25.2/x86_64-unknown-linux-gnu/rustup-init && \
|
|
echo "bb31eaf643926b2ee9f4d8d6fc0e2835e03c0a60f34d324048aa194f0b29a71c *rustup-init" | sha256sum -c - && \
|
|
chmod +x rustup-init && \
|
|
./rustup-init -y --no-modify-path --profile minimal \
|
|
--default-toolchain nightly --default-host x86_64-unknown-linux-gnu \
|
|
--component rustfmt --component rust-src --component clippy && \
|
|
rm rustup-init && \
|
|
chmod -R a+w $RUSTUP_HOME $CARGO_HOME
|
|
|
|
USER vscode
|
|
|
|
RUN cargo install cargo-make
|
|
|
|
#FROM rust:1-buster
|
|
#
|
|
#ENV DEBIAN_FRONTEND=noninteractive
|
|
#
|
|
#apk add musl-dev openssl-dev docker-compose lldb && \
|
|
#RUN apt update && \
|
|
# apt install -y git cmake make automake autoconf libtool valgrind flex musl-tools \
|
|
# linux-headers-5.10 bison docker-compose lldb libssl-dev libnl-3-dev sudo && \
|
|
# rustup component add clippy && \
|
|
# rustup target add x86_64-unknown-linux-musl && \
|
|
# useradd vscode && \
|
|
# mkdir -p /home/vscode && \
|
|
# chown -R vscode:vscode /home/vscode && \
|
|
# echo "vscode ALL=(ALL: ALL) NOPASSWD: ALL" >> /etc/sudoers |