J'utilise une image ubuntu:latest
pour créer une image docker meteorJS. Le problème est, que météore est téléchargé deux fois et je reçois quelques avertissements pour package.json.Docker: MeteorJS s'installe deux fois avec quelques avertissements
Dockerfile
FROM ubuntu:latest
# build arguments
ARG APP_PACKAGES
ARG APP_LOCALE=en_US
ARG APP_CHARSET=UTF-8
ARG APP_USER=app
ARG APP_USER_DIR=/home/${APP_USER}
# set the locale (required by Meteor)
RUN locale-gen ${APP_LOCALE}
RUN localedef ${APP_LOCALE}.${APP_CHARSET} -i ${APP_LOCALE} -f ${APP_CHARSET}
# create a non-root user that can write to /usr/local (required by Meteor)
RUN useradd -mUd ${APP_USER_DIR} ${APP_USER}
RUN chown -Rh ${APP_USER} /usr/local
USER ${APP_USER}
# MeteorJS
RUN curl https://install.meteor.com/ | sh
# NPM packages
WORKDIR '/builds/project/data'
RUN meteor npm install gridfs-stream gm fluent-ffmpeg
Et la dernière partie (RUN meteor ...
) me donne ceci:
This is your first time using Meteor!
Installing a Meteor distribution in your home directory.
Downloading Meteor distribution
Alors météore est téléchargé deux fois:
- boucle ...
- météore NPM installer ...
Aussi je reçois cet avertissement:
npm WARN enoent ENOENT: no such file or directory, open '/builds/project/data/package.json'
npm WARN media No description
npm WARN media No repository field.
npm WARN media No README data
npm WARN media No license field.
Pourquoi devrait-il y avoir un package.json, même si je ne l'utilise --save
?
Je ne vous vois pas installer la commande curl et curl n'est pas là par défaut dans ubuntu. Alors, comment se passe-t-il? RUN curl https://install.meteor.com/ | sh' est-ce que ça marche? –
Vous avez raison. J'ai sauté cette partie du Dockerfile pour le garder lisible ... – user3142695