Skip to content

✨ allow docker without sudo (install docker compose on alpine) #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ ARG FROM=webdevops/php-nginx-dev:8.2-alpine
ARG DIST_ADDON=-alpine
FROM $FROM AS base-alpine
# Install additional software Alpine:
RUN apk add --no-cache sudo vim nano git-perl less tree bash-completion mariadb-client iputils sshpass gdb tzdata findmnt jq docker-cli file && \
RUN apk add --no-cache sudo vim nano git-perl less tree bash-completion mariadb-client iputils sshpass gdb tzdata findmnt jq docker-cli docker-compose file && \
addgroup application $(getent group 999 | cut -d: -f1) && \
echo "application ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

FROM $FROM AS base
# Install additional software Debian:
RUN apt-get update && \
apt-get install -y sudo vim nano less tree bash-completion mariadb-client iputils-ping sshpass gdb jq && \
usermod -aG sudo application && \
usermod -aG 999 application && \
echo "application ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
curl -fsSL https://get.docker.com/ | sh && \
rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

CONTEXT=${CONTEXT:-Development}

USER=${APPLICATION_UID:-1000}:${APPLICATION_GID:-1000}
USER=${APPLICATION_UID:-1000}

if [ -z "$SSH_AUTH_SOCK" ]
then
Expand Down
Loading