I have trouble with using dockerfile to build image.
dockerfile:
FROM node:4.4
MAINTAINER paas
ENV NGINX_VERSION 1.11.6-1~jessie
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \
&& echo "deb nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
ca-certificates \
nginx=${NGINX_VERSION} \
nginx-module-xslt \
nginx-module-geoip \
nginx-module-image-filter \
nginx-module-perl \
nginx-module-njs \
gettext-base \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /etc/nginx/sites-enabled
# SSL Certificate Installation
ADD star_dar_kz.key /etc/ssl/
# ADD star_dar_kz.pem /etc/ssl/
# ADD dhparam.pem /etc/ssl/
# ADD nginx.conf /etc/nginx/
# ADD merchants.dar.kz.conf /etc/nginx/sites-enabled
COPY . /app
WORKDIR /app
RUN npm install --global gulp-cli
RUN npm install --global bower
RUN npm install
RUN bower --allow-root install
RUN gulp build --env prod
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
And after docker build, the GPG line appears as red and image creation fails. Why?
Sending build context to Docker daemon 3.072kB
Step 1/16 : FROM node:4.4
---> 93b396996a16
Step 2/16 : MAINTAINER Nurbek Sadykov
---> Using cache
---> e9a0bc967863
Step 3/16 : ENV NGINX_VERSION 1.11.6-1~jessie
---> Using cache
---> 3e87467bd365
Step 4/16 : RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && echo "deb h:/nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates nginx=${NGINX_VERSION} nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx-module-perl nginx-module-njs gettext-base curl && rm -rf /var/lib/apt/lists/*
---> Running in 93f88784bc24
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.acoVZ86x3m --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
**gpg: requesting key 7BD9BF62 from hkp server pgp.mit.edu**
**gpg: key 7BD9BF62: public key "nginx signing key " imported**
**gpg: Total number processed: 1**
**gpg: imported: 1 (RSA: 1)** - ** THIS IS INDICATED IN RED COLOR**
Get:1 url InRelease [63.1 kB]
Get:2 url InRelease [2865 B]
Ign url jessie InRelease
Get:3 url jessie-updates InRelease [145 kB]
Get:4 url amd64 Packages [37.3 kB]
Get:5 url jessie Release.gpg [2373 B]
Get:6 urljessie Release [148 kB]
Get:7 url amd64 Packages [613 kB]
Get:8 url amd64 Packages [23.2 kB]
Get:9 url jessie/main amd64 Packages [9063 kB]
Fetched 10.1 MB in 5s (1835 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
**Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming**.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nginx-module-geoip : Depends: nginx (= 1.13.7-1~jessie)
nginx-module-image-filter : Depends: nginx (= 1.13.7-1~jessie)
nginx-module-njs : Depends: nginx (= 1.13.7-1~jessie)
nginx-module-perl : Depends: nginx (= 1.13.7-1~jessie)
nginx-module-xslt : Depends: nginx (= 1.13.7-1~jessie)
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates nginx=${NGINX_VERSION} nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx-module-perl nginx-module-njs gettext-base curl && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
There were three issues in your Dockerfile:
Incorrect url to nginx packages
Nginx modules should be the same version as nginx
There is no version 1.11.6-1~jessie for module nginx-module-njs, so we need to add one more ENV variable.
The final Dockerfile is:
FROM node:4.4
MAINTAINER paas
ENV NGINX_VERSION 1.11.6-1~jessie
ENV NGINX_MODULE_NJS 1.11.6.0.1.4-2~jessie
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \
&& echo 'deb http://nginx.org/packages/mainline/debian/ jessie nginx' >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
ca-certificates \
nginx=${NGINX_VERSION} \
nginx-module-xslt=${NGINX_VERSION} \
nginx-module-geoip=${NGINX_VERSION} \
nginx-module-image-filter=${NGINX_VERSION} \
nginx-module-perl=${NGINX_VERSION} \
nginx-module-njs=${NGINX_MODULE_NJS} \
gettext-base \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /etc/nginx/sites-enabled
# SSL Certificate Installation
ADD star_dar_kz.key /etc/ssl/
# ADD star_dar_kz.pem /etc/ssl/
# ADD dhparam.pem /etc/ssl/
# ADD nginx.conf /etc/nginx/
# ADD merchants.dar.kz.conf /etc/nginx/sites-enabled
COPY . /app
WORKDIR /app
RUN npm install --global gulp-cli
RUN npm install --global bower
RUN npm install
RUN bower --allow-root install
RUN gulp build --env prod
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Related
I want ot build a Docker image with the following features:
Must have a Debian 11 base image (Mandatory)
On top of it, I also need installed:
Python 3.
spaCy package (There could be others of my choice).
Google Cloud SDK (I will need this to run commands using gcloud and gsutil).
Most likely, I will download some files stored in some Cloud Storage bucket.
I decided to use gcr.io/cloud-marketplace/google/debian11:latest because as far as I understood, that base image should have both Python and Google Cloud SDK already installed on top of it, but it did not, so I started adding what I needed on my own.
My first Dockerfile attempt (defaults) looks as follows:
FROM gcr.io/cloud-marketplace/google/debian11:latest
RUN apt-get update -y
# Suggested by #JohnHanley, in the comments section
RUN apt-get install apt-transport-https ca-certificates gnupg -y
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
apt-get update -y && \
apt-get install google-cloud-cli -y
# Back to my original implementation
RUN apt-get install -y python3
RUN apt-get install -y python3-pip
RUN pip install spacy==3.2.1
CMD ["gsutil","--version"]
The error triggered:
------
> [4/6] RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && apt-get install google-cloud-cli -y:
#6 0.403 deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main
#6 0.403 /bin/sh: 1: curl: not found
#6 0.442 Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
#6 0.453 gpg: no valid OpenPGP data found.
------
executor failed running [/bin/sh -c echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && apt-get install google-cloud-cli -y]: exit code: 2
My second Dockerfile attempt ("If apt-key command is not supported") looks as follows:
FROM gcr.io/cloud-marketplace/google/debian11:latest
RUN apt-get update -y
# Suggested by #JohnHanley, in the comments section
RUN apt-get install apt-transport-https ca-certificates gnupg -y
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | tee /usr/share/keyrings/cloud.google.gpg && apt-get update -y && \
apt-get install google-cloud-sdk -y
# Back to my original implementation
RUN apt-get install -y python3
RUN apt-get install -y python3-pip
RUN pip install spacy==3.2.1
CMD ["gsutil","--version"]
The error triggered:
------
> [4/6] RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | tee /usr/share/keyrings/cloud.google.gpg && apt-get update -y && apt-get install google-cloud-sdk -y:
#7 0.423 deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main
#7 0.423 /bin/sh: 1: curl: not found
#7 0.974 Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
#7 1.130 Get:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
#7 1.215 Get:3 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
#7 1.373 Get:4 http://packages.cloud.google.com/apt cloud-sdk InRelease [6751 B]
#7 1.420 Err:4 http://packages.cloud.google.com/apt cloud-sdk InRelease
#7 1.420 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05 NO_PUBKEY FEEA9169307EA071
#7 1.431 Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [262 kB]
#7 1.590 Reading package lists...
#7 1.985 W: GPG error: http://packages.cloud.google.com/apt cloud-sdk InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05 NO_PUBKEY FEEA9169307EA071
#7 1.985 E: The repository 'http://packages.cloud.google.com/apt cloud-sdk InRelease' is not signed.
------
executor failed running [/bin/sh -c echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | tee /usr/share/keyrings/cloud.google.gpg && apt-get update -y && apt-get install google-cloud-sdk -y]: exit code: 100
If the section where Google Cloud SDK is installed gets commented, the rest works OK. Another important info:
The base OS:
Edition Windows 10 Pro
Version 22H2
Installed on 10/27/2022
OS build 19045.2251
Experience Windows Feature Experience Pack 120.2212.4180.0
Docker version: Docker version 20.10.21, build baeda1f
QUESTIONS:
What am I doing wrong?
Is there a better way to do what I want? (Image size can have up to 10GB in size, so optimization might be optional for this case).
UPDATES:
This section will include lengthy answers to questions raised in the comment sections.
2022-12-02, #JohnHanley suggested in thew comments, to follow Google official documentation (section "Docker Tip") to write the Dockerfiles, which I was already doing, but did not include in the original post; I am including that now. OS and Dockerfile versions are included also.
You can install gcloud cli in your container with the following way :
FROM gcr.io/cloud-marketplace/google/debian11:latest
RUN apt-get update -y
RUN apt install curl -y
ENV PATH=/google-cloud-sdk/bin:$PATH
WORKDIR /
RUN export CLOUD_SDK_VERSION="410.0.0" && \
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz && \
tar xzf google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz && \
rm google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz && \
ln -s /lib /lib64
RUN gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true && \
gcloud config set metrics/environment github_docker_images && \
gcloud -q components install beta kubectl
ENTRYPOINT [ "sh", "-c", "gcloud --version" ]
This part is not mandatory :
RUN gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true && \
gcloud config set metrics/environment github_docker_images && \
gcloud -q components install beta kubectl
I'm struggling to get Laravel Sail working. Following the instructions from the documentation I'm not really understanding why the container is failing to build. I don't have any docker experience.
./vendor/bin/sail php -v
returns "Cannot load Xdebug - it was already loaded"
./vendor/bin/sail build --no-cache fails who what reason?
Sorry if not much to go on, anyone who could point me in the right direction would be much appreciated.
wazimshizm#Surface-Pro-6:~/code/sports$ ./vendor/bin/sail php -v
Cannot load Xdebug - it was already loaded
PHP 8.0.7 (cli) (built: Jun 4 2021 21:26:10) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.7, Copyright (c) Zend Technologies
with Zend OPcache v8.0.7, Copyright (c), by Zend Technologies
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
wazimshizm#Surface-Pro-6:~/code/sports$ ./vendor/bin/sail build --no-cache
mysql uses an image, skipping
redis uses an image, skipping
meilisearch uses an image, skipping
mailhog uses an image, skipping
selenium uses an image, skipping
Building laravel.test
[+] Building 64.7s (8/16)
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 2.42kB 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:20.04 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 906B 0.0s
=> [ 1/12] FROM docker.io/library/ubuntu:20.04 0.0s
=> CACHED [ 2/12] WORKDIR /var/www/html 0.0s
=> [ 3/12] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone 0.5s
=> ERROR [ 4/12] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unz 64.0s
------
> [ 4/12] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.0-cli php8.0-dev php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-curl php8.0-memcached php8.0-imap php8.0-mysql php8.0-mbstring php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap php8.0-intl php8.0-readline php8.0-msgpack php8.0-igbinary php8.0-ldap php8.0-redis && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*:
#7 1.140 Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
#7 1.546 Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
#7 3.365 Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
#7 4.008 Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
#7 4.747 Get:5 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
#7 4.889 Get:6 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
#7 5.676 Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
#7 11.34 Get:8 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
#7 63.42 Reading package lists...
#7 63.94 E: Release file for http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease is not valid yet (invalid for another 5h 15min 5s). Updates for this repository will not be applied.
#7 63.94 E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 5h 15min 24s). Updates for this repository will not be applied.
#7 63.94 E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease is not valid yet (invalid for another 5h 15min 54s). Updates for this repository will not be applied.
------
executor failed running [/bin/sh -c apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.0-cli php8.0-dev php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-curl php8.0-memcached php8.0-imap php8.0-mysql php8.0-mbstring php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap php8.0-intl php8.0-readline php8.0-msgpack php8.0-igbinary php8.0-ldap php8.0-redis && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*]: exit code: 100
ERROR: Service 'laravel.test' failed to build : Build failed
wazimshizm#Surface-Pro-6:~/code/sports$ ./vendor/bin/sail build --no-cache
mysql uses an image, skipping
redis uses an image, skipping
meilisearch uses an image, skipping
mailhog uses an image, skipping
selenium uses an image, skipping
Building laravel.test
[+] Building 64.5s (8/16)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 38B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:20.04 0.0s
=> [ 1/12] FROM docker.io/library/ubuntu:20.04 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 99B 0.0s
=> CACHED [ 2/12] WORKDIR /var/www/html 0.0s
=> [ 3/12] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone 0.5s
=> ERROR [ 4/12] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unz 63.8s
------
> [ 4/12] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.0-cli php8.0-dev php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-curl php8.0-memcached php8.0-imap php8.0-mysql php8.0-mbstring php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap php8.0-intl php8.0-readline php8.0-msgpack php8.0-igbinary php8.0-ldap php8.0-redis && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*:
#7 1.142 Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
#7 1.219 Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
#7 3.044 Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
#7 3.684 Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
#7 4.414 Get:5 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
#7 56.13 Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
#7 61.75 Get:7 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
#7 62.16 Get:8 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
#7 63.17 Reading package lists...
#7 63.76 E: Release file for http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease is not valid yet (invalid for another 5h 12min 49s). Updates for this repository will not be applied.
#7 63.76 E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 5h 13min 7s). Updates for this repository will not be applied.
#7 63.76 E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease is not valid yet (invalid for another 5h 13min 38s). Updates for this repository will not be applied.
------
executor failed running [/bin/sh -c apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.0-cli php8.0-dev php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-curl php8.0-memcached php8.0-imap php8.0-mysql php8.0-mbstring php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap php8.0-intl php8.0-readline php8.0-msgpack php8.0-igbinary php8.0-ldap php8.0-redis && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*]: exit code: 100
ERROR: Service 'laravel.test' failed to build : Build failed
build:
context: ./vendor/laravel/sail/runtimes/8.0
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.0/app
Change 8.1 to ...runtimes/8.0 and and sail-8.0 , then try sail up
Documentation
provides syntax to install specific version of docker-ce:
$ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
On similar line, below dockerfile uses the above syntax:
FROM jenkins/jenkins:lts
ENV DEBIAN_FRONTEND=noninteractive
USER root
ARG DOCKER_GID=497
# Create Docker Group with GID
# Set default value of 497 if DOCKER_GID set to blank string by Docker compose
RUN groupadd -g ${DOCKER_GID:-497} docker
# Install base packages for docker, docker-compose & ansible
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 && \
RUN apt-get update -y && \
apt-get -y install bc \
gawk \
libffi-dev \
musl-dev \
apt-transport-https \
curl \
python3 \
python3-dev \
python3-setuptools \
gcc \
make \
libssl-dev \
python3-pip
# Used at build time but not runtime
ARG DOCKER_VERSION=5:19.03.4~3-0~ubuntu-bionic
# Install the latest Docker CE binaries and add user `jenkins` to the docker group
RUN apt-get update && \
apt-get -y install apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common && \
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable" && \
apt-get update && \
apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
containerd.io && \
usermod -aG docker jenkins
ARG DOCKER_COMPOSE=1.24.1
# Install docker compose
RUN curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE:-1.24.1}/docker-compose-$(uname -s)-$(uname -m)" \
-o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
RUN pip3 install ansible boto3
# Change to jenkins user
USER jenkins
# Add jenkins plugin
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
fails at line below(on build):
apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
containerd.io && \
where default values are retrieved from command: apt-cache madison docker-ce | awk 'NR==1{print $3}' in my local docker host
where docker-compose build gives below error:
Reading state information...
E: Version '5:19.03.4~3-0~ubuntu-bionic' for 'docker-ce' was not found
E: Version '5:19.03.4~3-0~ubuntu-bionic' for 'docker-ce-cli' was not found
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c apt-get update && apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common && curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" && apt-get update && apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} containerd.io && usermod -aG docker jenkins' returned a non-zero code: 100
apt-get -y install docker-ce docker-ce-cli containerd.io is able to download and install the latest version of ubuntu packages, but why download and install of specific version of ubuntu package fails?
apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
containerd.io && \
You've selected Docker versions based on what's available on your build host, not what's available inside the container image you're building. The jenkins:lts image is based on Debian Stretch, not Ubuntu Bionic.
Dockerfiles are actually just running fairly ordinary Docker operations. So, for example, you can run docker run -ti -u root jenkins/jenkins:lts /bin/bash, run your RUN scripts by hand, and check the apt-cache output inside the container:
# apt-cache madison docker-ce
docker-ce | 5:19.03.4~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
docker-ce | 5:19.03.3~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
docker-ce | 5:19.03.2~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
docker-ce | 5:19.03.1~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
docker-ce | 5:19.03.0~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
Also, a failed docker build should leave the partially-complete image around; so you can use that directly to investigate a failure. As an example with a trivially failing step RUN false:
⋮
Removing intermediate container baaeab34bb8c
---> 6d34bab07796
Step 3/3 : RUN false
---> Running in 8347f442dfaa
The command '/bin/sh -c false' returned a non-zero code: 1
The 6d34bab07796 image is left around. You can pass that to docker run and investigate why the command failed. The 8347f442dfaa container is also left around, though exited; you can use the various docker container subcommands to investigate it as well.
I am having so much trouble with docker. It seems to be a pattern. I have a dockerfile which installs Node.js and Yarn from source repositories fine. I install ruby from the get-apt repositories (which gives me 2.3.0), then RVM and update Ruby to 2.3.3 (what my application has been using)... but then, when I go to run bundle install I get a version conflict with Rails:
Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails
(= 4.2.6)', in any of the sources.
ERROR: Service 'theaterengine' failed to build: The command '/bin/sh -c /bin/bash -l -c "bundle install"' returned a non-zero code: 6
I have tried explicitly installing lower versions of bundler but it always seems to try and use that version. I have tried deleting Gemfile.lock as well. Please help
Dockerfile:
FROM ubuntu:16.04
ENV LANG C.UTF-8
ENV BUNDLE_PATH=\bundle
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev gnupg2 curl
# INSTALL NODE.JS
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
# gpg keys listed at https://github.com/nodejs/node#release-team
RUN set -ex \
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
77984A986EBC2AA786BC0F66B01FBB92821C587A \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
; do \
gpg --batch --keyserver hkp://pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done
ENV NODE_MAJOR 10
RUN NODE_VERSION=$(curl -SL "https://nodejs.org/dist/index.tab" \
| grep "^v$NODE_MAJOR" \
| head -n 1 | awk '{ print substr($1,2) }') \
&& ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
# INSTALL YARN
RUN YARN_VERSION=$(curl -sSL --compressed https://yarnpkg.com/latest-version) \
set -ex \
&& for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \
; do \
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& mkdir -p /opt \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
# INSTALL OTHER DEPENDENCIES
RUN apt-get update -qq && apt-get install -y git \
libxml2-dev \
libxslt1-dev \
libqt4-dev \
libqtwebkit4 \
xvfb \
file \
libcurl4-gnutls-dev
# INSTALL RVM AND RUBY
RUN \
apt-get update && \
apt-get install -y ruby ruby-dev bundler && \
rm -rf /var/lib/lists/*
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN curl -sSl https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable
RUN ["/bin/bash", "-l", "-c", "rvm requirements"]
RUN ["/bin/bash", "-l", "-c", "rvm install 2.3.3 --default"]
RUN /bin/bash -l -c "gem env && bundle config && gem install bundler --version 1.17.3"
# RAILS ENV VARIABLES AND BUNDLING
ENV APP_HOME /theaterengine
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
BUNDLE_JOBS=2
RUN /bin/bash -l -c "bundle install"
# RUN ["/usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.17.3/exe/bundle", "install"]
ADD . $APP_HOME
docker-compose.yml:
version: '2'
services:
theaterengine:
extends:
file: docker-common.yml
service: web
links:
- postgres
- redis
- elasticsearch
env_file:
- .theaterengine.env
postgres:
volumes:
- ./scripts:/docker-entrypoint-initdb.d
extends:
file: docker-common.yml
service: postgres
redis:
extends:
file: docker-common.yml
service: redis
elasticsearch:
extends:
file: docker-common.yml
service: elasticsearch
sidekiq:
extends:
file: docker-common.yml
service: sidekiq
links:
- postgres
- redis
volumes:
bundle: {}
postgres: {}
redis: {}
docker-common.yml:
version: '2'
services:
web:
build: .
command: bin/rails server --port 8000 --binding 0.0.0.0
volumes:
- .:/theaterengine
- bundle:/bundle
ports:
- '80:8000'
env_file:
- .theaterengine.env
postgres:
image: postgres:9.6.2
environment:
POSTGRES_USER: theaterengine
POSTGRES_PASSWORD: theaterengine
ports:
- '5432:5432'
volumes:
- postgres:/var/lib/postgresql/data
redis:
image: redis:latest
ports:
- '6379:6379'
volumes:
- redis:/var/lib/redis/data
elasticsearch:
image: elasticsearch:5.6
command: elasticsearch
environment:
ES_JAVA_OPTS: "-Des.network.host=0.0.0.0 -Xmx1024m -Xms256m -Des.scripting.exception_for_missing_value=true"
sidekiq:
build: .
command: bundle exec sidekiq -C config/sidekiq.yml
volumes:
- .:/theaterengine
- bundle:/bundle
env_file:
- .theaterengine.env
output of docker-compose build --no-cache theaterengine
Building theaterengine
Step 1/24 : FROM ubuntu:16.04
---> 7e87e2b3bf7a
Step 2/24 : ENV LANG C.UTF-8
---> Running in ae5029491687
Removing intermediate container ae5029491687
---> 5912b6c9d20d
Step 3/24 : ENV BUNDLE_PATH=\bundle
---> Running in 2cb056b4fc6b
Removing intermediate container 2cb056b4fc6b
---> 31f18e8fa92e
Step 4/24 : RUN apt-get update -qq && apt-get install -y build-essential libpq-dev gnupg2 curl
---> Running in e9f4cec8e789
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
binutils bzip2 ca-certificates comerr-dev cpp cpp-5 dirmngr dpkg-dev
fakeroot g++ g++-5 gcc gcc-5 gnupg-agent ifupdown iproute2 isc-dhcp-client
isc-dhcp-common krb5-locales krb5-multidev libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libasn1-8-heimdal
libassuan0 libatm1 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5
libcurl3-gnutls libdns-export162 libdpkg-perl libfakeroot libffi6
libfile-fcntllock-perl libgcc-5-dev libgdbm3 libgmp10 libgnutls30 libgomp1
libgssapi-krb5-2 libgssapi3-heimdal libgssrpc4 libhcrypto4-heimdal
libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal
libidn11 libisc-export160 libisl15 libitm1 libk5crypto3 libkadm5clnt-mit9
libkadm5srv-mit9 libkdb5-8 libkeyutils1 libkrb5-26-heimdal libkrb5-3
libkrb5support0 libksba8 libldap-2.4-2 liblsan0 libmnl0 libmpc3 libmpfr4
libmpx0 libnettle6 libnpth0 libp11-kit0 libperl5.22 libpq5 libquadmath0
libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db
libsqlite3-0 libssl-dev libssl-doc libssl1.0.0 libstdc++-5-dev libtasn1-6
libtsan0 libubsan0 libwind0-heimdal libxtables11 linux-libc-dev make
manpages manpages-dev netbase openssl patch perl perl-modules-5.22
pinentry-curses rename xz-utils zlib1g-dev
Suggested packages:
binutils-doc bzip2-doc doc-base cpp-doc gcc-5-locales debian-keyring
g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib autoconf
automake libtool flex bison gdb gcc-doc gcc-5-multilib libgcc1-dbg
libgomp1-dbg libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg
libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg
gnupg-doc parcimonie xloadimage ppp rdnssd iproute2-doc resolvconf
avahi-autoipd isc-dhcp-client-ddns apparmor krb5-doc glibc-doc gnutls-bin
krb5-user postgresql-doc-9.5 libsasl2-modules-otp libsasl2-modules-ldap
libsasl2-modules-sql libsasl2-modules-gssapi-mit
| libsasl2-modules-gssapi-heimdal libstdc++-5-doc make-doc man-browser ed
diffutils-doc perl-doc libterm-readline-gnu-perl
| libterm-readline-perl-perl pinentry-doc
The following NEW packages will be installed:
binutils build-essential bzip2 ca-certificates comerr-dev cpp cpp-5 curl
dirmngr dpkg-dev fakeroot g++ g++-5 gcc gcc-5 gnupg-agent gnupg2 ifupdown
iproute2 isc-dhcp-client isc-dhcp-common krb5-locales krb5-multidev
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
libasan2 libasn1-8-heimdal libassuan0 libatm1 libatomic1 libc-dev-bin
libc6-dev libcc1-0 libcilkrts5 libcurl3-gnutls libdns-export162 libdpkg-perl
libfakeroot libffi6 libfile-fcntllock-perl libgcc-5-dev libgdbm3 libgmp10
libgnutls30 libgomp1 libgssapi-krb5-2 libgssapi3-heimdal libgssrpc4
libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4
libhx509-5-heimdal libidn11 libisc-export160 libisl15 libitm1 libk5crypto3
libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-8 libkeyutils1 libkrb5-26-heimdal
libkrb5-3 libkrb5support0 libksba8 libldap-2.4-2 liblsan0 libmnl0 libmpc3
libmpfr4 libmpx0 libnettle6 libnpth0 libp11-kit0 libperl5.22 libpq-dev
libpq5 libquadmath0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules
libsasl2-modules-db libsqlite3-0 libssl-dev libssl-doc libssl1.0.0
libstdc++-5-dev libtasn1-6 libtsan0 libubsan0 libwind0-heimdal libxtables11
linux-libc-dev make manpages manpages-dev netbase openssl patch perl
perl-modules-5.22 pinentry-curses rename xz-utils zlib1g-dev
0 upgraded, 108 newly installed, 0 to remove and 0 not upgraded.
Need to get 57.6 MB of archives.
...
...
148 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Removing intermediate container e9f4cec8e789
---> 66fa6d267a05
Step 5/24 : RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node
---> Running in b7e86d75e030
Removing intermediate container b7e86d75e030
---> eeaf38d31a2a
Step 6/24 : RUN set -ex && for key in 4ED778F539E3634C779C87C6D7062848A1AB005C B9E2F5981AA6E0CD28160D9FF13993A75599653C 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 B9AE9905FFD7803F25714661B63B535A4C206CA9 77984A986EBC2AA786BC0F66B01FBB92821C587A 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 FD3A5288F042B6850C66B31F09FE44734EB7990E 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 DD8F2338BAE7501E3DD5AC78C273792F7D83545D A48C2BEE680E841632CD4E44F07496B3EB3C1762 ; do gpg --batch --keyserver hkp://pool.sks-keyservers.net --recv-keys "$key" || gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; done
---> Running in 55265cf5a4fa
...
...
Removing intermediate container 55265cf5a4fa
---> 7d3de60af5fc
Step 7/24 : ENV NODE_MAJOR 10
---> Running in 57f05fb87dd7
Removing intermediate container 57f05fb87dd7
---> 9df11bd47c50
Step 8/24 : RUN NODE_VERSION=$(curl -SL "https://nodejs.org/dist/index.tab" | grep "^v$NODE_MAJOR" | head -n 1 | awk '{ print substr($1,2) }') && ARCH= && dpkgArch="$(dpkg --print-architecture)" && case "${dpkgArch##*-}" in amd64) ARCH='x64';; ppc64el) ARCH='ppc64le';; s390x) ARCH='s390x';; arm64) ARCH='arm64';; armhf) ARCH='armv7l';; i386) ARCH='x86';; *) echo "unsupported architecture"; exit 1 ;; esac && curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" && curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt && ln -s /usr/local/bin/node /usr/local/bin/nodejs
---> Running in 0b8e7b8bb68f
...
...
Removing intermediate container 0b8e7b8bb68f
---> 56204b1054e0
Step 9/24 : RUN YARN_VERSION=$(curl -sSL --compressed https://yarnpkg.com/latest-version) set -ex && for key in 6A010C5166006599AA17F08146C2130DFD2497F5 ; do gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; done && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz && mkdir -p /opt && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
---> Running in 6a45f5c124a7
+ gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 6A010C5166006599AA17F08146C2130DFD2497F5
gpg: requesting key FD2497F5 from hkp server p80.pool.sks-keyservers.net
gpg: key 86E50310: public key "Yarn Packaging <yarn#dan.cx>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
...
...
+ mkdir -p /opt
+ tar -xzf yarn-v1.13.0.tar.gz -C /opt/
+ ln -s /opt/yarn-v1.13.0/bin/yarn /usr/local/bin/yarn
+ ln -s /opt/yarn-v1.13.0/bin/yarnpkg /usr/local/bin/yarnpkg
+ rm yarn-v1.13.0.tar.gz.asc yarn-v1.13.0.tar.gz
Removing intermediate container 6a45f5c124a7
---> 83ed68b00e7d
Step 10/24 : RUN apt-get update -qq && apt-get install -y git libxml2-dev libxslt1-dev libqt4-dev libqtwebkit4 xvfb file libcurl4-gnutls-dev
---> Running in 10d6197af7ca
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
dbus fontconfig fontconfig-config fonts-dejavu-core git-man
gstreamer1.0-plugins-base icu-devtools iso-codes less libaudio2
libavahi-client3 libavahi-common-data libavahi-common3 libbsd0 libcap-ng0
libcdparanoia0 libcups2 libdbus-1-3 libdrm-amdgpu1 libdrm-common libdrm-dev
libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1
liberror-perl libexpat1 libfontconfig1 libfontenc1 libfreetype6
libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0
libglib2.0-data libglu1-mesa libglu1-mesa-dev libgstreamer-plugins-base1.0-0
libgstreamer1.0-0 libice6 libicu-dev libicu55 libjbig0 libjpeg-turbo8
libjpeg8 liblcms2-2 libllvm6.0 libmagic1 libmng2 libmysqlclient20 libogg0
libopus0 liborc-0.4-0 libpciaccess0 libpixman-1-0 libpng12-0 libpopt0
libpthread-stubs0-dev libqt4-dbus libqt4-declarative libqt4-designer
libqt4-dev-bin libqt4-help libqt4-network libqt4-opengl libqt4-opengl-dev
libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql
libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns
libqtcore4 libqtdbus4 libqtgui4 libsensors4 libsm6 libtheora0 libtiff5
libtxc-dxtn-s2tc0 libvisual-0.4-0 libvorbis0a libvorbisenc2 libx11-6
libx11-data libx11-dev libx11-doc libx11-xcb-dev libx11-xcb1 libxau-dev
libxau6 libxaw7 libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0
libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-present-dev
libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render0
libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-sync-dev
libxcb-sync1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb1 libxcb1-dev
libxdamage-dev libxdamage1 libxdmcp-dev libxdmcp6 libxext-dev libxext6
libxfixes-dev libxfixes3 libxfont1 libxi6 libxkbfile1 libxml2 libxmu6
libxmuu1 libxpm4 libxrender1 libxshmfence-dev libxshmfence1 libxslt1.1
libxt6 libxxf86vm-dev libxxf86vm1 mesa-common-dev mysql-common
openssh-client qdbus qt-at-spi qt4-linguist-tools qt4-qmake qtchooser
qtcore4-l10n rsync sgml-base shared-mime-info ucf x11-common x11-xkb-utils
x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev
x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
x11proto-xf86vidmode-dev xauth xdg-user-dirs xfonts-base xfonts-encodings
xfonts-utils xkb-data xml-core xorg-sgml-doctools xserver-common xtrans-dev
Suggested packages:
dbus-user-session | dbus-x11 gettext-base git-daemon-run
| git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch
git-cvs git-mediawiki git-svn gvfs isoquery nas cups-common libcurl4-doc
libcurl3-dbg libgnutls-dev libidn11-dev libkrb5-dev libldap2-dev librtmp-dev
pkg-config libvisual-0.4-plugins gstreamer1.0-tools icu-doc liblcms2-utils
opus-tools pciutils libqt4-declarative-folderlistmodel
libqt4-declarative-gestures libqt4-declarative-particles
libqt4-declarative-shaders qt4-qmlviewer firebird-dev libmysqlclient-dev
libsqlite0-dev libsqlite3-dev qt4-dev-tools qt4-doc unixodbc-dev libthai0
qt4-qtconfig lm-sensors libxcb-doc libxext-doc ssh-askpass libpam-ssh
keychain monkeysphere openssh-server sgml-base-doc debhelper
The following NEW packages will be installed:
dbus file fontconfig fontconfig-config fonts-dejavu-core git git-man
gstreamer1.0-plugins-base icu-devtools iso-codes less libaudio2
libavahi-client3 libavahi-common-data libavahi-common3 libbsd0 libcap-ng0
libcdparanoia0 libcups2 libcurl4-gnutls-dev libdbus-1-3 libdrm-amdgpu1
libdrm-common libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1
libdrm2 libedit2 libelf1 liberror-perl libexpat1 libfontconfig1 libfontenc1
libfreetype6 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
libglib2.0-0 libglib2.0-data libglu1-mesa libglu1-mesa-dev
libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libice6 libicu-dev libicu55
libjbig0 libjpeg-turbo8 libjpeg8 liblcms2-2 libllvm6.0 libmagic1 libmng2
libmysqlclient20 libogg0 libopus0 liborc-0.4-0 libpciaccess0 libpixman-1-0
libpng12-0 libpopt0 libpthread-stubs0-dev libqt4-dbus libqt4-declarative
libqt4-designer libqt4-dev libqt4-dev-bin libqt4-help libqt4-network
libqt4-opengl libqt4-opengl-dev libqt4-qt3support libqt4-script
libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-svg libqt4-test
libqt4-xml libqt4-xmlpatterns libqtcore4 libqtdbus4 libqtgui4 libqtwebkit4
libsensors4 libsm6 libtheora0 libtiff5 libtxc-dxtn-s2tc0 libvisual-0.4-0
libvorbis0a libvorbisenc2 libx11-6 libx11-data libx11-dev libx11-doc
libx11-xcb-dev libx11-xcb1 libxau-dev libxau6 libxaw7 libxcb-dri2-0
libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev
libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev
libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev
libxcb-sync-dev libxcb-sync1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb1
libxcb1-dev libxdamage-dev libxdamage1 libxdmcp-dev libxdmcp6 libxext-dev
libxext6 libxfixes-dev libxfixes3 libxfont1 libxi6 libxkbfile1 libxml2
libxml2-dev libxmu6 libxmuu1 libxpm4 libxrender1 libxshmfence-dev
libxshmfence1 libxslt1-dev libxslt1.1 libxt6 libxxf86vm-dev libxxf86vm1
mesa-common-dev mysql-common openssh-client qdbus qt-at-spi
qt4-linguist-tools qt4-qmake qtchooser qtcore4-l10n rsync sgml-base
shared-mime-info ucf x11-common x11-xkb-utils x11proto-core-dev
x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev
x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
x11proto-xf86vidmode-dev xauth xdg-user-dirs xfonts-base xfonts-encodings
xfonts-utils xkb-data xml-core xorg-sgml-doctools xserver-common xtrans-dev
xvfb
...
...
Removing intermediate container 10d6197af7ca
---> f797cd358613
Step 11/24 : RUN apt-get update && apt-get install -y ruby ruby-dev bundler && rm -rf /var/lib/lists/*
---> Running in cddd19cdbe85
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
fonts-lato javascript-common libgmp-dev libgmpxx4ldbl libjs-jquery
libruby2.3 libyaml-0-2 rake ruby-bundler ruby-did-you-mean ruby-minitest
ruby-molinillo ruby-net-http-persistent ruby-net-telnet ruby-power-assert
ruby-test-unit ruby-thor ruby2.3 ruby2.3-dev rubygems-integration sudo unzip
zip
Suggested packages:
apache2 | lighttpd | httpd gmp-doc libgmp10-doc libmpfr-dev ri
The following NEW packages will be installed:
bundler fonts-lato javascript-common libgmp-dev libgmpxx4ldbl libjs-jquery
libruby2.3 libyaml-0-2 rake ruby ruby-bundler ruby-dev ruby-did-you-mean
ruby-minitest ruby-molinillo ruby-net-http-persistent ruby-net-telnet
ruby-power-assert ruby-test-unit ruby-thor ruby2.3 ruby2.3-dev
rubygems-integration sudo unzip zip
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 8357 kB of archives.
...
...
Removing intermediate container cddd19cdbe85
---> 6a0b2f77087b
Step 12/24 : RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
---> Running in c185a2f95fbd
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: requesting key 39499BDB from hkp server keys.gnupg.net
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis#gmail.com>" imported
gpg: key 39499BDB: public key "Piotr Kuczynski <piotr.kuczynski#gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 2
gpg: imported: 2 (RSA: 2)
Removing intermediate container c185a2f95fbd
---> 28942e1516c8
Step 13/24 : RUN curl -sSl https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable
---> Running in 4521aa379be2
Downloading https://github.com/rvm/rvm/archive/1.29.7.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.7...
...
...
/1.29.7.tar.gz.asc
Removing intermediate container 4521aa379be2
---> 326d003275db
Step 14/24 : RUN ["/bin/bash", "-l", "-c", "rvm requirements"]
---> Running in 9b7cf125de07
mesg: ttyname failed: Inappropriate ioctl for device
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..
Installing required packages: gawk, autoconf, automake, bison, libffi-dev, libgdbm-dev, libncurses5-dev, libsqlite3-dev, libtool, libyaml-dev, pkg-config, sqlite3, libreadline6-dev.............
Requirements installation successful.
Removing intermediate container 9b7cf125de07
---> bc89ea7eb165
Step 15/24 : RUN ["/bin/bash", "-l", "-c", "rvm install 2.3.3 --default"]
---> Running in 938d6dbb8e50
mesg: ttyname failed: Inappropriate ioctl for device
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.2
- RUBY VERSION: 2.3.3 (2016-11-21 patchlevel 222) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.3.3
- USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-2.3.3/bin
- SPEC CACHE DIRECTORY: /root/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-2.3.3
- /usr/local/rvm/gems/ruby-2.3.3#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/rvm/gems/ruby-2.3.3/bin
- /usr/local/rvm/gems/ruby-2.3.3#global/bin
- /usr/local/rvm/rubies/ruby-2.3.3/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/local/rvm/bin
Settings are listed in order of priority. The top value will be used.
path
Set via BUNDLE_PATH: "bundle"
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Installing ri documentation for bundler-1.17.3
Done installing documentation for bundler after 35 seconds
1 gem installed
Removing intermediate container d77b774c18b3
---> ed73a09a9ce1
Step 17/24 : ENV APP_HOME /theaterengine
---> Running in 23dd5a5a2564
Removing intermediate container 23dd5a5a2564
---> 31bb685d4a18
Step 18/24 : RUN mkdir $APP_HOME
---> Running in e249f33df047
Removing intermediate container e249f33df047
---> 0c4655341563
Step 19/24 : WORKDIR $APP_HOME
Removing intermediate container 2b66d8ba845d
---> a006fb0074b8
Step 20/24 : COPY Gemfile Gemfile
---> dd19d7576314
Step 21/24 : COPY Gemfile.lock Gemfile.lock
---> aafe1a3149d4
Step 22/24 : ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile BUNDLE_JOBS=2
---> Running in afd6c6d74122
Removing intermediate container afd6c6d74122
---> 802e91bda185
Step 23/24 : RUN /bin/bash -l -c "bundle install"
---> Running in c896b57d062b
mesg: ttyname failed: Inappropriate ioctl for device
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching https://github.com/gavinkflam/lightbox2-rails.git
Fetching https://github.com/nathanvda/cocoon.git
Fetching https://github.com/derekprior/momentjs-rails.git
Fetching https://github.com/zpaulovics/datetimepicker-rails.git
Cloning into 'bootstrap-datetimepicker'...
Fetching https://github.com/jhenahan/administrate.git
Fetching gem metadata from https://rails-assets.org/...
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/..............
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/...
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/...
Resolving dependencies.............................................................
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.2.6) was resolved to 4.2.6, which depends on
bundler (< 2.0, >= 1.3.0)
Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails
(= 4.2.6)', in any of the sources.
ERROR: Service 'theaterengine' failed to build: The command '/bin/sh -c /bin/bash -l -c "bundle install"' returned a non-zero code: 6
I just build this image for ruby 2.3.3 and it work fine. You can try this:
FROM ruby:2.3.3
RUN apt-get install -y libpq5 libpq-dev
# install nodejs
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
# Install yarn
RUN npm i -g yarn
WORKDIR /
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.