diff --git a/Dockerfile b/Dockerfile index 9dbb30f..c67514f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM ubuntu:22.04 LABEL org.opencontainers.image.authors="Badak Team Blibli.com " +RUN rm /bin/sh && ln -s /bin/bash /bin/sh ARG VERSION=4.9 ARG user=jenkins @@ -12,11 +13,18 @@ ARG gid=1000 RUN apt-get update RUN apt-get -y upgrade RUN apt install -y git -RUN apt-get install -y curl && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash -RUN export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" -RUN [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -RUN nvm install 18 -RUN nvm use 18 +RUN apt-get install -y curl +# nvm environment variables +ENV NVM_DIR /usr/local/nvm +ENV NODE_VERSION 18 +RUN mkdir /usr/local/nvm +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash +# install node and npm +RUN source $NVM_DIR/nvm.sh \ + && nvm install $NODE_VERSION \ + && nvm alias default $NODE_VERSION \ + && nvm use default + RUN apt-get install -y build-essential # Install a basic SSH server