dockerfile npm install Permission denied - docker

I have a "legacy" code (symfony) running on php7.3 and they were using node v6 and gulp for assets.
I want to build a Docker development environment, but I am having problems with node and permissions.
In my company, we use LDAP for authentication, so our user id is not 1000, so I need to create a user inside docker with the same host id and gid.
I have it almost working but when I try to install gulp I get this error:
Step 37/47 : RUN npm install -g gulp
---> Running in 607492f81dfe
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
/root/.nvm/versions/node/v6.17.1/bin/gulp -> /root/.nvm/versions/node/v6.17.1/lib/node_modules/gulp/bin/gulp.js
> es5-ext#0.10.59 postinstall /root/.nvm/versions/node/v6.17.1/lib/node_modules/gulp/node_modules/es5-ext
> node -e "try{require('./_postinstall')}catch(e){}"
sh: 1: node: Permission denied
/root/.nvm/versions/node/v6.17.1/lib
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/gulp/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 5.13.0-30-generic
npm ERR! argv "/root/.nvm/versions/node/v6.17.1/bin/node" "/root/.nvm/versions/node/v6.17.1/bin/npm" "install" "-g" "gulp"
npm ERR! node v6.17.1
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! es5-ext#0.10.59 postinstall: `node -e "try{require('./_postinstall')}catch(e){}"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the es5-ext#0.10.59 postinstall script 'node -e "try{require('./_postinstall')}catch(e){}"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the es5-ext package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node -e "try{require('./_postinstall')}catch(e){}"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs es5-ext
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls es5-ext
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/src/app/npm-debug.log
npm ERR! code 1
Removing intermediate container 607492f81dfe
The command '/bin/sh -c npm install -g gulp' returned a non-zero code: 1
ERROR: Service 'app' failed to build : Build failed
This is the Dockefile I'm using:
FROM php:7.3-fpm
ARG USER_ID=1000
ARG GROUP_ID=1000
ARG DOCKER_TIMEZONE=${DOCKER_TIMEZONE}
ARG DEBUGMODE=0
ARG FOSJSDUMP=0
ARG TIMEZONE
ENV PS1="\u#\h:\w\\$ "
RUN echo "${DOCKER_TIMEZONE}" > /etc/timezone
RUN useradd -l -u ${USER_ID} -g users appuser
RUN groupmod --gid $GROUP_ID www-data
# 2 Set working directory
WORKDIR /usr/src/app
ENV NODE_VERSION=6.17.1
RUN apt install -y curl
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
ENV NVM_DIR=/root/.nvm
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN node --version
RUN npm --version
RUN apt-get update && apt-get install -y \
gnupg \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
g++ \
procps \
openssl \
git \
unzip \
zlib1g-dev \
libzip-dev \
libfreetype6-dev \
libpng-dev \
libjpeg-dev \
libicu-dev \
libonig-dev \
libxslt1-dev \
acl \
&& echo 'alias sf="php bin/console"' >> ~/.bashrc
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install -j$(nproc) \
zip \
exif \
bcmath \
intl \
pcntl \
mysqli \
pdo \
gd \
pdo_mysql \
mbstring \
soap \
opcache \
iconv
# Install Imagick
RUN apt-get update && apt-get install -y \
libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick
# xdebug extensions
RUN if [[ "$DEBUGMODE" = "0" ]] ; \
then \
echo "DEBUG MODE NOT ENABLED"; \
else \
# echo DEGUGMODE $DEBUGMODE \
pecl install xdebug && docker-php-ext-enable xdebug \
; fi
#
# ldap
RUN apt-get install libldap2-dev -y && \
rm -rf /var/lib/apt/lists/* && \
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
docker-php-ext-install ldap
# Redis
RUN pecl install -o -f redis && rm -rf /tmp/pear && docker-php-ext-enable redis
# Set timezone
RUN ln -snf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && echo ${TIMEZONE} > /etc/timezone \
&& printf '[PHP]\ndate.timezone = "%s"\n', ${TIMEZONE} > /usr/local/etc/php/conf.d/tzone.ini \
&& "date"
# Install Composer
RUN echo "Install Composer"
RUN composer --version
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /usr/src/app
RUN npm install -g gulp
RUN gulp prod
# 8 Copy existing application directory permissions
COPY --chown=appuser:appuser . /usr/src/app
RUN composer install --no-scripts --prefer-dist --no-interaction --optimize-autoloader
RUN php bin/console cache:clear
RUN mkdir -p /usr/src/app/web/uploads
RUN chmod -R 777 /usr/src/app/web/uploads
#RUN chown -R www-data:www-data /usr/src/app
# 9 Change current user
USER appuser
# 10 Expose port 9000 and start php-fpm server
EXPOSE 9000
CMD ["php-fpm", "-F"]
WORKDIR /usr/src/app
Any help or clue?

Related

Could not open '/lib64/ld-linux-x86-64.so.2' on running npm install

I have a docker file I have built that uses the arm64v8/ arch type (I use an M1 Mac), no issues during the build at all, but as soon as try and install any npm dependencies I am met with this output:
root#456d8199a91d:/var/www/html# npm install
npm ERR! code 1
npm ERR! path /var/www/html/node_modules/optipng-bin
npm ERR! command failed
npm ERR! command sh -c node lib/install.js
npm ERR! compiling from source
npm ERR! Command failed: /var/www/html/node_modules/optipng-bin/vendor/optipng --version
npm ERR! qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
npm ERR!
npm ERR!
npm ERR! optipng pre-build test failed
npm ERR! Error: Command failed: /bin/sh -c make install
npm ERR! pngrtran.c:99:1: warning: 'png_rtran_ok' defined but not used [-Wunused-function]
npm ERR! 99 | png_rtran_ok(png_structrp png_ptr, int need_IHDR)
npm ERR! | ^~~~~~~~~~~~
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! pngxmem.c: In function 'pngx_malloc_rows_extended':
npm ERR! pngxmem.c:38:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
npm ERR! 38 | (pngx_alloc_size_t)height > (pngx_alloc_size_t)(-1) / sizeof(png_bytep))
npm ERR! | ^
npm ERR! ar: `u' modifier ignored since `D' is the default (see `U')
npm ERR! /usr/bin/ld: ../libpng/libpng.a(pngrutil.o): in function `png_read_filter_row':
npm ERR! pngrutil.c:(.text+0x1f64): undefined reference to `png_init_filter_functions_neon'
npm ERR! collect2: error: ld returned 1 exit status
npm ERR! make[1]: *** [Makefile:100: optipng] Error 1
npm ERR! make: *** [Makefile:14: install] Error 2
I notice that it mentions '/lib64/ld-linux-x86-64.so.2' which I only saw previously when trying to use the amd64 arch type for the same image build. My Dockerfile config is as follows:
FROM arm64v8/php:8.1-apache
RUN apt-get update
EXPOSE 80
RUN apt-get install -y \
git \
zip \
curl \
sudo \
unzip \
libicu-dev \
libbz2-dev \
libpng-dev \
libjpeg-dev \
libmcrypt-dev \
libreadline-dev \
libfreetype6-dev \
libonig-dev \
libzip-dev \
nodejs \
npm \
g++
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
RUN a2enmod rewrite headers
RUN docker-php-ext-install \
bz2 \
intl \
iconv \
bcmath \
opcache \
calendar \
mbstring \
pdo_mysql \
zip
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions pdo_pgsql
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# This needs to be set in .env as 'UID', must match the host id, attained using 'id -u'
# prevents root ownership on apache + other saved files
ARG uid
RUN useradd -G www-data,root -u $uid -d /home/devuser devuser
RUN mkdir -p /home/devuser/.composer && \
chown -R devuser:devuser /home/devuser
# Necessary drivers for redis adapter
RUN pecl channel-update pecl.php.net
RUN pecl install -f redis
RUN sudo apt update
RUN yes | apt install vim
Im not sure why it errors with what looks to be the wrong arch type being used when I have specified FROM arm64v8/php:8.1-apache? Bare in mind I have used this config for a couple of months with no issues until today, is there something blindingly obvious I'm missing in the npm install output?
Many thanks to #CharlesDuffy , as mentioned the version of optipng-bin I was attempting to install (2.0.0) was shipped with x86_64 libraries and nothing to support arm, bumping to 4.2.0 did the trick.

GitHub Self Hosted Runner Can't Find Command

I have the following Dockerfile:
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install curl \
iputils-ping \
apt-transport-https \
tar \
jq \
python && \
curl -sL https://deb.nodesource.com/setup_14.x | bash && \
apt-get install nodejs -yq && \
apt-get clean && apt-get autoremove
RUN npm install -g npm#latest
ARG GH_RUNNER_VERSION="2.283.3"
WORKDIR /actions-runner
RUN curl -o actions.tar.gz --location "https://github.com/actions/runner/releases/download/v${GH_RUNNER_VERSION}/actions-runner-linux-x64-${GH_RUNNER_VERSION}.tar.gz" && \
tar -zxf actions.tar.gz && \
rm -f actions.tar.gz && \
./bin/installdependencies.sh
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/actions-runner/entrypoint.sh"]
and the following step on the ci:
- name: Create DB
run: npm run dc-up
The output of that step is: npm: command not found.
I added the path using the method the docs suggested, it was done by adding a new step:
- name: add npm to path
run: echo "/usr/bin/npm" >> $GITHUB_PATH
I've checked that node is in the path by printing the path in a separate step inside the CI and the output is:
Run echo "$PATH"
/usr/bin/npm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
I know 100% that NPM is installed into the docker image because when I run it local and only try to interact withit without the ENTRYPOINT then I'm able to print the NPM version and I checked that is it indeed in /usr/bin/npm, but still, inside the steps of the CI it can't find npm for some reason.
And its not only for npm, but for every single installation that I tried to do, I just picked npm for showcase.
Anyone has any idea what can be done?

Conditional npm install ARG in Dockerfile

I am trying to install node module packages from GitHub on the basis of the argument. I have tried but however I do not understand this solution completely. There is no error in the execution but I am sure it does not install the package. I run the container locally before deploy and getting the module not found an error
Dokerfile is like that.Can it be possible to keep each command in a new line?
FROM node:10
ENV HOME /usr/src/reach-live-api
ARG siteval
RUN mkdir -p $HOME
RUN mkdir -p /root/.ssh
WORKDIR $HOME
COPY ./keys/reachlive_rsa /root/.ssh/id_rsa
RUN chmod 700 /root/.ssh/id_rsa
RUN echo "Host bitbucket.org\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config
COPY . $HOME
RUN npm install --silent --production
RUN if [ "$siteval" = "prod" ]; then \
RUN npm install "reach-live-elasticsearch#git+https://github.com/lalitmohan001/reach-live-elasticsearch-prod.git" \
RUN npm install "reach-live-firebase#git+https://github.com/lalitmohan001/reach-live-firebase-prod.git" \
RUN npm install "reach-live-paypal#git+https://github.com/lalitmohan001/reach-live-paypal-prod.git" \
else \
RUN npm install "reach-live-elasticsearch#git+https://github.com/lalitmohan001/reach-live-elasticsearch.git" \
RUN npm install "reach-live-firebase#git+https://github.com/lalitmohan001/reach-live-firebase.git" \
RUN npm install "reach-live-paypal#git+https://github.com/lalitmohan001/reach-live-paypal.git"; \
fi
RUN npm prune --production
RUN rm -fr .npm
RUN rm -fr /root/.ssh
RUN rm -fr keys
CMD ["npm", "start"]
I use the following command to build
docker build -t gcr.io/reachlive-123/api:25Apr2020 . --build-arg siteval=dev
Help would be much appreciated
turns out the problem was in the
RUN if [ "$siteval" = "prod" ]; then \
RUN npm install "reach-live-elasticsearch#git+https://github.com/lalitmohan001/reach-live-elasticsearch-prod.git" \
RUN npm install "reach-live-firebase#git+https://github.com/lalitmohan001/reach-live-firebase-prod.git" \
RUN npm install "reach-live-paypal#git+https://github.com/lalitmohan001/reach-live-paypal-prod.git" \
else \
RUN npm install "reach-live-elasticsearch#git+https://github.com/lalitmohan001/reach-live-elasticsearch.git" \
RUN npm install "reach-live-firebase#git+https://github.com/lalitmohan001/reach-live-firebase.git" \
RUN npm install "reach-live-paypal#git+https://github.com/lalitmohan001/reach-live-paypal.git"; \
fi
I have changed it to and it works
RUN if [ "$arg" = "prod" ]; then \
npm install reach-live-elasticsearch#git+https://github.com/lalitmohan001/reach-live-elasticsearch-prod.git \
reach-live-firebase#git+https://github.com/lalitmohan001/reach-live-firebase-prod.git \
reach-live-paypal#git+https://github.com/lalitmohan001/reach-live-paypal-prod.git ; \
else \
npm install reach-live-elasticsearch#git+https://github.com/lalitmohan001/reach-live-elasticsearch.git \
reach-live-firebase#git+https://github.com/lalitmohan001/reach-live-firebase.git \
reach-live-paypal#git+https://github.com/lalitmohan001/reach-live-paypal.git; \
fi
Thanks to Pavittar Singh for helping us figure this out!

Why docker-compose build start from begining

For example.
Every time I build.
Copy package.json
Install package.json
Add current directory.
My question is:
Why it does not use from the cache. For example, It should not install the package.json from the start if the package.json does not change.
It should use the cache and update only the changes code.
Update:
Dockerfile
FROM ubuntu:18.04
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
gcc \
git \
libpq-dev \
make \
python-pip \
python2.7 \
python2.7-dev \
apt-transport-https \
curl \
g++ \
sudo \
wget \
bzip2 \
chrpath \
libssl-dev \
libxft-dev \
libfreetype6 \
libfreetype6-dev \
libfontconfig1 \
libfontconfig1-dev \
libfontconfig \
poppler-utils \
imagemagick \
&& apt-get clean \
&& rm -rf /tmp/* /var/lib/apt/lists/* \
&& apt-get -y autoclean
RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common && add-apt-repository ppa:malteworld/ppa && apt update && apt install -y --no-install-recommends pdftk \
&& apt-get clean \
&& rm -rf /tmp/* /var/lib/apt/lists/* \
&& apt-get -y autoclean
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 10.6.0
# Install nvm with node and npm
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash \
&& source $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
# Set up our PATH correctly so we don't have to long-reference npm, node, &c.
ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Set the work directory
RUN mkdir -p /var/www/app/jobsaf-website
RUN mkdir /data
RUN mkdir /data/db
WORKDIR /var/www/app/jobsaf-website
RUN npm install -g node-gyp #angular/cli#6.2.3 nodemon request
# Add our package.json and install *before* adding our application files
COPY package.json ./
# RUN npm install --force
RUN npm install --force
RUN npm rebuild node-sass
# Add application files
ADD . .
EXPOSE 3000 5858 4200 35729 27017 6379 49153
.dockerignore
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/tmp
/public/__build__/
/src/*/__build__/
/__build__/**
/public/dist/
/src/*/dist/
/dist/**
/.awcache
.webpack.json
/compiled/
dll/
package-lock.json
# dependencies
/node_modules
*/node_modules
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
**.js.map
.settings/
# IDE - VSCode
.vscode/
# misc
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log
/typings
# e2e
/e2e/*.js
/e2e/*.map
#System Files
.DS_Store
Thumbs.db
*.csv
*.dat
*.iml
*.log
*.out
*.pid
*.seed
*.sublime-*
*.swo
*.swp
*.tgz
*.xml
.strong-pm
coverage
npm-debug*
/admin/dist
npm
/.cache-loader/*
stats.json
!/src/assets/js/admin-header.js
!/src/assets/js/website-custom.js
webpack-cache/
web/
/src/app/**/*.map
/src/app/**/*.js
--force should be removed from the following line as it will ignore any cache and do a fresh installation for your packages which leads to a new docker build layer starting from the installation step.
RUN npm install --force
The -f or --force argument will force npm to fetch remote resources even if a local copy exists on disk.

Docker build mfp image with error

I'm trying to run a DockerFile.
What I want to do is run a MobileFirst Image so that I can run inside it File.adapter files. So first I want to raise the application server with a dockerfile, unfornutally I got this output:
$ docker build -f ./doc .
Sending build context to Docker daemon 4.608kB
Step 1/23 : FROM ubuntu:14.04
---> 971bb384a50a
Step 2/23 : MAINTAINER Gabriel Mancini <gmancini#br.ibm.com> (#new_biel)
---> Using cache
---> 2669f78208fd
Step 3/23 : RUN apt-get update && apt-get install -y apt-transport-https build-
ssential git-core wget unzip supervisor
---> Running in c846bc39a7a3
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://security.ubuntu.com trusty-security Release.gpg
Ign http://security.ubuntu.com trusty-security Release
Err http://security.ubuntu.com trusty-security/universe Sources
403 Forbidden [IP: 91.189.88.149 80]
....
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/mult
verse/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.149 80]
E: Some index files failed to download. They have been ignored, or old ones use
instead.
The command '/bin/sh -c apt-get update && apt-get install -y apt-transport-http
build-essential git-core wget unzip supervisor' returned a non-zero code: 100
Docker file:
FROM ubuntu:14.04
MAINTAINER Gabriel Mancini <gmancini#br.ibm.com> (#new_biel)
# Install basics
RUN apt-get update && \
apt-get install -y \
apt-transport-https \
build-essential \
git-core \
wget \
unzip \
supervisor
# Install Java.
# add webupd8 repository
RUN \
echo "===> add webupd8 repository..." && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
apt-get update && \
\
\
echo "===> install Java" && \
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes oracle-java8-installer oracle-java8-set-default \
maven && \
\
echo "===> clean up..." && \
rm -rf /var/cache/oracle-jdk7-installer && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-7-oracle
# Install NodeJS
ENV NODE_VERSION 0.10.29
RUN \
wget -q -O - "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \
| tar xzf - --strip-components=1 --exclude="README.md" --exclude="LICENSE" \
--exclude="ChangeLog" -C "/usr/local"
# Install node-gyp
RUN npm install -g node-gyp
# Install nodevisor
RUN git clone https://github.com/TAKEALOT/nodervisor.git /opt/nodervisor \
&& cd /opt/nodervisor \
&& npm install
# Install Mobile First Platform
ENV MFP_VERSION 7.0.0
RUN MFP_URL="https://public.dhe.ibm.com/ibmdl/export/pub/software/products/en/MobileFirstPlatform/mobilefirst_cli_installer_$MFP_VERSION.zip" \
&& wget -q $MFP_URL -U UA-IBM-WebSphere-Liberty-Docker -O "/tmp/mobilefirst_cli_installer_$MFP_VERSION.zip" \
&& unzip -q "/tmp/mobilefirst_cli_installer_$MFP_VERSION.zip" -d /tmp/mfp \
&& unzip -q "/tmp/mfp/mobilefirst-cli-installer-$MFP_VERSION/resources/mobilefirst-cli-$MFP_VERSION-install.zip" -d /opt/ibm \
&& rm -rf /tmp/mfp* \
&& cd /opt/ibm/mobilefirst-cli \
&& npm install
ENV PATH /opt/ibm/mobilefirst-cli:$PATH
ENV PATH node_modules/.bin:$PATH
ENV PATH node_modules/bin:$PATH
# Configure mfp
COPY mfp /opt/ibm/mobilefirst-cli/mfp
RUN chmod 755 /opt/ibm/mobilefirst-cli/mfp
# Configure supervisor
RUN mkdir -p /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN chmod 755 /etc/supervisor/conf.d/supervisord.conf
# Configure WebSphere Liberty
RUN mfp create-server
EXPOSE 10080 3000
#WORKDIR /workspace
VOLUME /workspace
CMD ["/usr/bin/supervisord"]
#CMD ["mfp", "-d", "start"]
Can you guide me what could be going wrong?
Im running it in windows 7 in dockerToolbox.
Ubuntu 14.4 is rather old now, consider a newer one, if possible. I don't know if updates for it are being published now.
If you have to use it, you might not be able to pull updates for it anymore. If there are no updates, the latest versions of all packages (at the time the last updates were published) should be available on archive.ubunut.com. There may be a handy replacement for /etc/apt/sources.list somewhere that is configured to use the archive and works for Ubuntu 14.

Resources