Skip to content

Commit

Permalink
chore(superchain): grant passwordless sudo to superchain user (#3758)
Browse files Browse the repository at this point in the history
Instead of granting only via `sudo` group, allow the `superchain` user to passwordless sudo, in hopes this fixes the currently broken behavior in GitHub Actions.

Additionally, remove the `dockerd-entrypoint.sh` script that did not work propertly and was neither tested, nor used (to our knowledge).



---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
  • Loading branch information
RomainMuller authored Sep 20, 2022
1 parent 3d2126c commit 79951b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion superchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ RUN pip install aws-sam-cli
# Install some configuration
COPY superchain/ssh_config /root/.ssh/config
RUN chmod 600 /root/.ssh/config
COPY superchain/dockerd-entrypoint.sh /usr/local/bin/

# Create the image's non-root user, and enable no-password sudo
RUN groupadd --gid 1001 superchain \
&& useradd --shell /bin/bash --comment "Docker User" --uid 1001 --gid 1001 --no-log-init --groups sudo superchain \
&& echo "%sudo ALL = (ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers.d/nopasswd \
&& echo "superchain ALL = (ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers.d/nopasswd \
&& chmod 0440 /etc/sudoers.d/nopasswd
COPY --chown=superchain:superchain superchain/m2-settings.xml /home/superchain/.m2/settings.xml
COPY --chown=superchain:superchain superchain/ssh_config /home/superchain/.ssh/config
Expand Down
23 changes: 0 additions & 23 deletions superchain/dockerd-entrypoint.sh

This file was deleted.

0 comments on commit 79951b7

Please sign in to comment.