File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM php:7.4-cli
2+
3+ # Install system dependencies
4+ RUN apt-get update && apt-get install -y \
5+ zip \
6+ unzip \
7+ git \
8+ && rm -rf /var/lib/apt/lists/*
9+
10+ # Install Composer
11+ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
12+ && php composer-setup.php \
13+ && mv composer.phar /usr/local/bin/composer \
14+ && php -r "unlink('composer-setup.php');" \
15+ && chmod +x /usr/local/bin/composer
16+
17+ # Create a non-root user
18+ ARG USERNAME=upsun
19+ ARG USER_UID=1000
20+ ARG USER_GID=$USER_UID
21+
22+ RUN groupadd --gid $USER_GID $USERNAME \
23+ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
24+ && apt-get update \
25+ && apt-get install -y sudo \
26+ && echo $USERNAME ALL=\( root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
27+ && chmod 0440 /etc/sudoers.d/$USERNAME
28+
29+ USER $USERNAME
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " Upsun CLI" ,
3+ "build" : {
4+ "dockerfile" : " Dockerfile"
5+ },
6+ "remoteUser" : " upsun" ,
7+ "postCreateCommand" : " composer install"
8+ }
You can’t perform that action at this time.
0 commit comments