blob: b88a40155a706dee7f46fcc2a207eb4e015403ac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
FROM mcr.microsoft.com/devcontainers/rust:2-trixie
## Tooling and configuration
ARG PKGS_TOOLS="llvm-19 sqlite3 sqlite3-tools"
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y hx starship sudo ${PKGS_TOOLS} \
&& ln -s /usr/bin/lldb-dap-19 /usr/local/bin/lldb-dap
## Code area configuration
ARG WORKING_DIR="/code"
RUN mkdir -p ${WORKING_DIR}
## Container user - will override 'vscode', 'users' defaults
ARG USER=sparrow
ARG USER_UID=1000
ARG USER_GID=1000
ARG USERS_GID=998
RUN groupmod -n ${USER} "$(grep ${USER_GID} /etc/group | cut -d: -f1)" \
&& groupmod --gid ${USERS_GID} users \
&& usermod -l ${USER} -m -d /home/${USER} -Gusers "$(grep ${USER_UID} /etc/passwd | cut -d: -f1)" \
&& chown -R ${USER_UID}:${USER_GID} /home/${USER} \
&& echo "${USER} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
RUN echo 'eval "$(starship init zsh)"' >> /home/${USER}/.zshrc \
&& chown ${USER}:${USER} ${WORKING_DIR}
USER ${USER}
RUN mkdir ~/.ssh ~/.gnupg ~/.config/helix \
&& chmod 0700 ~/.ssh ~/.gnupg
RUN cargo install --locked cargo-tarpaulin
WORKDIR ${WORKING_DIR}
|