Skip to content

Commit

Permalink
feature: add sudoers entry to allow 'node' user to run /bin/date with…
Browse files Browse the repository at this point in the history
…out password
  • Loading branch information
KEGustafsson committed Aug 26, 2024
1 parent 16e3a6e commit cdf92f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/Dockerfile_base
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node

RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install git python3 python2 build-essential avahi-daemon avahi-discover avahi-utils libnss-mdns mdns-scan libavahi-compat-libdnssd-dev sysstat procps nano curl libcap2-bin sudo \
&& groupadd -r docker -g 998 && groupadd -r i2c -g 997 && groupadd -r spi -g 999 && usermod -a -G dialout,i2c,spi,netdev,docker node
&& groupadd -r docker -g 998 && groupadd -r i2c -g 997 && groupadd -r spi -g 999 && usermod -a -G dialout,i2c,spi,netdev,docker node \
&& echo 'node ALL=(ALL) NOPASSWD:/bin/date' >> /etc/sudoers

RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs \
Expand Down

0 comments on commit cdf92f3

Please sign in to comment.