# This file was autogenerated using the repository configuration tool at https://github.com/achianumba/repo.
# ALL MANUAL CHANGES WILL BE OVERWRITTEN THE NEXT TIME THE REPOSITORY CONFIGURATION TOOL RUNS!!!
FROM rust:latest

ARG DEBIAN_FRONTEND=noninteractive
ARG X_USER=vscode
ARG X_UID=1000
ARG X_GID=${X_UID}

# Create container user
RUN [ $(awk -F: '{print $1}' /etc/passwd | grep -c ${X_USER}) -eq 0 ] \
  && groupadd -g ${X_GID} ${X_USER} \
  && useradd -g ${X_GID} -u ${X_UID} -ms /bin/bash ${X_USER} \
  && apt update && apt -y install sudo \
  && echo ${X_USER} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${X_USER} \
  && chmod 0440 /etc/sudoers.d/${X_USER}
