Install Node from download instead of apk

pull/1/head
Carlos Gomes 2021-11-12 00:01:00 +01:00
rodzic fd359142f6
commit b6102b5872
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 870909DFEF7C5FB9
4 zmienionych plików z 64 dodań i 8 usunięć

Wyświetl plik

@ -3,7 +3,6 @@ FROM $FROM_IMAGE
LABEL maintainer="Carlos A. Gomes <carlos.algms@gmail.com>"
ARG DEPLOYER_VERSION="v6.8.0"
RUN apk add --no-cache \
util-linux \
@ -16,13 +15,8 @@ RUN apk add --no-cache \
rsync \
git \
mysql-client \
nodejs \
npm \
yarn \
composer \
make \
&& curl -L https://deployer.org/releases/${DEPLOYER_VERSION}/deployer.phar --output /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep
make
ARG PECL_EXT="mcrypt-1.0.4"
ARG PHP_EXT="mysqli pspell zip"
@ -44,3 +38,19 @@ if [ ! -z "$PECL_EXT" ]; then \
fi; \
docker-php-ext-install -j "$(nproc)" $PHP_EXT; \
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

14
Makefile 100644
Wyświetl plik

@ -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"

Wyświetl plik

@ -12,7 +12,7 @@ To deploy and transfer files, [Deployer](https://deployer.org), SSH, and RSync a
## 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)
* PHP 8-cli, 7.1-cli
* [Composer - latest](https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md)

32
zshrc 100644
Wyświetl plik

@ -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
}