Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Mar 25, 2024
1 parent a48a91b commit 395d1fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
7 changes: 0 additions & 7 deletions .devcontainer/entrypoint.d/docker-socket-perms.sh

This file was deleted.

12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
less \
locales \
make \
sudo \
tzdata \
zsh && \
# cleanup
Expand All @@ -51,6 +52,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN sed -i 's/UID_MAX .*/UID_MAX 100000/' /etc/login.defs && \
groupadd --gid ${PGID} ${USER} && \
useradd --uid ${PUID} --gid ${PGID} -s /bin/${TERM_SHELL} -m ${USER} && \
echo ${USER} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USER} && \
chmod 0440 /etc/sudoers.d/${USER} && \
echo "alias l='ls -lhA --color=auto --group-directories-first'" >> /etc/zshenv && \
echo "alias es='env | sort'" >> /etc/zshenv && \
echo "PS1='\h:\$(pwd) \$ '" >> /etc/zshenv && \
Expand All @@ -67,6 +70,11 @@ if [ -v DOCKER_ENTRYPOINT_DEBUG ] && [ "$DOCKER_ENTRYPOINT_DEBUG" == 1 ]; then
set -o xtrace
fi

if [ -S "/var/run/docker.sock" ]; then
echo "Docker socket detected. changing ownership to ${USER}:${USER}..."
sudo chown ${USER}:${USER} /var/run/docker.sock
fi

# Check if the directory exists
if [ -d "${PROJECT_PATH}/.devcontainer/entrypoint.d" ]; then
# Loop through all *.sh files in the directory and execute them
Expand Down Expand Up @@ -141,7 +149,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ripgrep \
rsync \
sshpass \
sudo \
tar \
tree \
util-linux \
Expand All @@ -153,9 +160,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
apt-get autoclean -y && \
rm -rf /var/lib/apt/lists/*

RUN echo ${USER} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USER} && \
chmod 0440 /etc/sudoers.d/${USER}

ENV DOTFILES_URL=https://github.com/ilude/dotfiles.git

USER ${USER}
Expand Down

0 comments on commit 395d1fd

Please sign in to comment.