install composer and npm from the package-manager
All checks were successful
ci/woodpecker/push/build_alpine Pipeline was successful
All checks were successful
ci/woodpecker/push/build_alpine Pipeline was successful
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
FROM php:8-fpm-alpine
|
||||
|
||||
# node version number like "12.22.1" or empty for the latest version
|
||||
ARG NODE_VERSION=''
|
||||
|
||||
# composer version number like "2.1" or empty for the latest version
|
||||
ARG COMPOSER_VERSION=''
|
||||
|
||||
ENV NVM_DIR="/root/.nvm"
|
||||
|
||||
# port to for the webserver
|
||||
@@ -13,24 +7,9 @@ ENV WEBSERVER_PORT=8080
|
||||
|
||||
COPY start-container.sh /usr/local/bin/start-container
|
||||
|
||||
# preinstalled hash openssl pcre tokenizer
|
||||
RUN apk add --no-cache curl-dev libxml2-dev oniguruma-dev \
|
||||
RUN apk add --no-cache curl-dev libxml2-dev oniguruma-dev composer npm \
|
||||
&& docker-php-ext-install ctype curl dom fileinfo filter mbstring pdo session xml \
|
||||
&& chmod +x /usr/local/bin/start-container \
|
||||
&& echo "install composer" \
|
||||
&& curl -o composer-setup.php https://getcomposer.org/installer \
|
||||
&& curl -o composer-setup.sig https://composer.github.io/installer.sig \
|
||||
&& echo " composer-setup.php" >> composer-setup.sig \
|
||||
&& sha384sum -c composer-setup.sig \
|
||||
&& if [ -n "$COMPOSER_VERSION" ]; then COMPOSER_VERSION="--${COMPOSER_VERSION}"; fi \
|
||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer $COMPOSER_VERSION \
|
||||
&& rm composer-setup.php composer-setup.sig /var/www/html/* \
|
||||
&& echo "install nvm and node" \
|
||||
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash \
|
||||
&& if [ -z "$NODE_VERSION" ]; then NODE_VERSION="node"; fi \
|
||||
&& [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
|
||||
&& nvm install $NODE_VERSION \
|
||||
&& nvm alias default $NODE_VERSION;
|
||||
&& chmod +x /usr/local/bin/start-container
|
||||
|
||||
EXPOSE ${WEBSERVER_PORT}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user