-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.common
45 lines (41 loc) · 1.69 KB
/
Dockerfile.common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
CMD ["/dev.sh"]
ARG DEBIAN_FRONTEND=noninteractive
ENV APPLICATION_ENV=dev \
PHP_DISPLAY_ERRORS=On \
ENABLE_DEV=On \
ENABLE_REDIS=On \
NODE_START=Off \
XDEBUG_ENABLE=On
COPY --chown=edge . /
RUN sudo apt-get update \
&& sudo rm -Rf /etc/php/$PHP_VERSION/cli \
&& sudo apt-get install --no-install-recommends --yes \
imagemagick \
jq \
rsync \
sassc \
mysql-client \
php${PHP_VERSION}-gd \
php${PHP_VERSION}-imagick \
vim \
&& sudo rm -Rf /etc/php/$PHP_VERSION/cli \
&& sudo ln -s /etc/php/$PHP_VERSION/fpm /etc/php/$PHP_VERSION/cli \
# Install Magerun
&& sudo wget https://files.magerun.net/n98-magerun2.phar -O /usr/local/bin/magerun2 \
&& sudo chmod +x /usr/local/bin/magerun2 \
&& sudo wget https://raw.githubusercontent.com/netz98/n98-magerun2/master/res/autocompletion/bash/n98-magerun2.phar.bash -P /etc/profile.d \
&& sudo chmod +x /usr/local/bin/masquerade \
# Preserve prestissimo for Composer 1 & install cache clean tool
&& if [ "$COMPOSER_VERSION" = "1" ]; then mv /home/edge/.composer /home/edge/.composer.orig; fi \
&& sudo -H -u edge composer global require mage2tv/magento-cache-clean \
# Create gitpod user and group
&& sudo addgroup --gid 33333 --system gitpod \
&& sudo adduser --uid 33333 --system --home /home/gitpod --shell /bin/bash --ingroup gitpod gitpod \
&& sudo addgroup gitpod edge \
&& sudo addgroup gitpod sudo \
&& sudo addgroup nginx gitpod \
&& sudo addgroup www-data gitpod \
&& sudo cp -rf /home/edge/. /home/gitpod/ \
&& sudo chown -R gitpod:gitpod /home/gitpod/ \
# Cleanup
&& sudo rm -rf /var/lib/apt/lists/*