-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM ubuntu:noble | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# For manage user | ||
RUN apt update -qq && \ | ||
apt upgrade -y -qq && \ | ||
apt install -y -qq --no-install-recommends sudo software-properties-common | ||
|
||
# install prerequisites | ||
RUN apt install -y -qq --no-install-recommends \ | ||
git \ | ||
ansible | ||
|
||
# Add non root user | ||
ARG USERNAME=user | ||
ARG PASSWORD=user | ||
ARG GROUPNAME=user | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN groupadd -g $GID $GROUPNAME && \ | ||
useradd -m -s /bin/bash -u $UID -g $GID -G sudo $USERNAME && \ | ||
echo $USERNAME:$PASSWORD | chpasswd && \ | ||
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | ||
USER $USERNAME | ||
|
||
WORKDIR /home/$USERNAME/dotfiles | ||
COPY ./ . | ||
RUN ./test/docker/run_deb |