-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (49 loc) · 2.26 KB
/
Dockerfile
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM wordpress:php8.2-apache
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git && \
apt-get install -y unzip && \
apt-get install -y nodejs build-essential npm
RUN node --version
RUN npm --version
# RUN curl -fsSL https://deb.nodesource.com/setup_current.x | bash - && \
# apt-get install -y nodejs \
# build-essential && \
# node --version && \
# npm --version
RUN curl -O https://github.com/wp-cli/wp-cli/releases/download/v2.9.0/wp-cli-2.9.0.phar
RUN php wp-cli-2.9.0.phar --info
RUN chmod +x wp-cli-2.9.0.phar
RUN mv wp-cli-2.9.0.phar /usr/local/bin/wp
RUN wp --info
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/local/bin/composer
RUN which composer
RUN composer global require --dev squizlabs/php_codesniffer
RUN composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
RUN composer global require --dev dealerdirect/phpcodesniffer-composer-installer
RUN composer global require --dev phpcsstandards/phpcsutils
RUN composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
RUN composer global require --dev wp-coding-standards/wpcs:"^3.0"
RUN composer global update wp-coding-standards/wpcs --with-dependencies
ENV PATH="${PATH}:/root/.composer/vendor/bin"
RUN echo $PATH
RUN phpcs -i
# RUN phpcs --config-set installed_paths /root/.composer/vendor/wp-coding-standards/wpcs
# RUN phpcs -i
# RUN phpcs /var/www/html/wp-content/plugins/secure-login-with-oauth
# ENV NODE_VERSION=21
# ENV NVM_DIR /tmp/nvm
# WORKDIR $NVM_DIR
# RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
# && . $NVM_DIR/nvm.sh \
# && nvm install $NODE_VERSION \
# && nvm alias default $NODE_VERSION \
# && nvm use default
# ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
# ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH
# RUN node --version
# RUN npm --version