kopia lustrzana https://github.com/carlos-algms/composer-and-node-ci
Install Node from download instead of apk
rodzic
fd359142f6
commit
b6102b5872
24
Dockerfile
24
Dockerfile
|
@ -3,7 +3,6 @@ FROM $FROM_IMAGE
|
||||||
|
|
||||||
LABEL maintainer="Carlos A. Gomes <carlos.algms@gmail.com>"
|
LABEL maintainer="Carlos A. Gomes <carlos.algms@gmail.com>"
|
||||||
|
|
||||||
ARG DEPLOYER_VERSION="v6.8.0"
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
util-linux \
|
util-linux \
|
||||||
|
@ -16,13 +15,8 @@ RUN apk add --no-cache \
|
||||||
rsync \
|
rsync \
|
||||||
git \
|
git \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
nodejs \
|
|
||||||
npm \
|
|
||||||
yarn \
|
|
||||||
composer \
|
composer \
|
||||||
make \
|
make
|
||||||
&& curl -L https://deployer.org/releases/${DEPLOYER_VERSION}/deployer.phar --output /usr/local/bin/dep \
|
|
||||||
&& chmod +x /usr/local/bin/dep
|
|
||||||
|
|
||||||
ARG PECL_EXT="mcrypt-1.0.4"
|
ARG PECL_EXT="mcrypt-1.0.4"
|
||||||
ARG PHP_EXT="mysqli pspell zip"
|
ARG PHP_EXT="mysqli pspell zip"
|
||||||
|
@ -44,3 +38,19 @@ if [ ! -z "$PECL_EXT" ]; then \
|
||||||
fi; \
|
fi; \
|
||||||
docker-php-ext-install -j "$(nproc)" $PHP_EXT; \
|
docker-php-ext-install -j "$(nproc)" $PHP_EXT; \
|
||||||
apk del .build-deps
|
apk del .build-deps
|
||||||
|
|
||||||
|
|
||||||
|
ARG DEPLOYER_VERSION="v6.8.0"
|
||||||
|
RUN curl -L https://deployer.org/releases/${DEPLOYER_VERSION}/deployer.phar --output /usr/local/bin/dep \
|
||||||
|
&& chmod +x /usr/local/bin/dep
|
||||||
|
|
||||||
|
|
||||||
|
# Install node, npm and yarn
|
||||||
|
ARG NODE_VERSION="v16.13.0"
|
||||||
|
RUN curl -O https://unofficial-builds.nodejs.org/download/release/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64-musl.tar.xz \
|
||||||
|
&& tar xJf node-v*.xz -C /usr --strip-components=1 --no-same-owner \
|
||||||
|
&& rm node-v*.xz \
|
||||||
|
&& npm i -g yarn
|
||||||
|
|
||||||
|
|
||||||
|
COPY zshrc /root/.zshrc
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
build_8:
|
||||||
|
docker build . --rm \
|
||||||
|
-t carlosalgms/composer-and-node-ci:latest \
|
||||||
|
-t carlosalgms/composer-and-node-ci:php8
|
||||||
|
|
||||||
|
build_71:
|
||||||
|
docker build . --rm \
|
||||||
|
-t carlosalgms/composer-and-node-ci:php7.1 \
|
||||||
|
--build-arg=FROM_IMAGE="php:7.1-cli-alpine" \
|
||||||
|
--build-arg=DEPLOYER_VERSION="v6.6.0" \
|
||||||
|
--build-arg=PECL_EXT="" \
|
||||||
|
--build-arg=ENABLE_EXT="" \
|
||||||
|
--build-arg=PHP_EXT="mysqli pspell zip mcrypt"
|
|
@ -12,7 +12,7 @@ To deploy and transfer files, [Deployer](https://deployer.org), SSH, and RSync a
|
||||||
|
|
||||||
## This image includes:
|
## This image includes:
|
||||||
|
|
||||||
* [NodeJS 14.x and NPM](https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions)
|
* [NodeJS 16.x and NPM](https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions)
|
||||||
* [yarn - latest](https://classic.yarnpkg.com/en/docs/install/#debian-stable)
|
* [yarn - latest](https://classic.yarnpkg.com/en/docs/install/#debian-stable)
|
||||||
* PHP 8-cli, 7.1-cli
|
* PHP 8-cli, 7.1-cli
|
||||||
* [Composer - latest](https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md)
|
* [Composer - latest](https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md)
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
PROMPT=$'\n'"%B%F{green}%n%f %F{blue}%~%f%b"$'\n'"λ "
|
||||||
|
|
||||||
|
export LS_OPTIONS='--color=auto -F --group-directories-first'
|
||||||
|
alias ls='ls $LS_OPTIONS'
|
||||||
|
alias ll='ls $LS_OPTIONS -l'
|
||||||
|
alias l='ls $LS_OPTIONS -lA'
|
||||||
|
|
||||||
|
extract () {
|
||||||
|
if [ -f $1 ] ; then
|
||||||
|
filename=$(basename -- "$1")
|
||||||
|
filename="${filename%.*}"
|
||||||
|
target="${2-"./$filename"}"
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
*.tar.bz2) tar xvjf $1 -C "$target" ;;
|
||||||
|
*.tar.gz) tar xvzf $1 -C "$target" ;;
|
||||||
|
*.tar.xz) tar xJf $1 -C "$target" ;;
|
||||||
|
*.bz2) bunzip2 $1 ;;
|
||||||
|
*.rar) rar x $1 "$target" ;;
|
||||||
|
*.gz) gunzip $1 ;;
|
||||||
|
*.tar) tar xvf $1 -C "$target" ;;
|
||||||
|
*.tbz2) tar xvjf $1 -C "$target" ;;
|
||||||
|
*.tgz) tar xvzf $1 -C "$target" ;;
|
||||||
|
*.zip) unzip $1 -d "$target" ;;
|
||||||
|
*.Z) uncompress $1 ;;
|
||||||
|
*.7z) 7z x $1 -o"$target" ;;
|
||||||
|
*) echo "don't know how to extract '$1'..." ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "'$1' is not a valid file!"
|
||||||
|
fi
|
||||||
|
}
|
Ładowanie…
Reference in New Issue