我正在嘗試dockerize我的node.js應用程序。我創建了一個Dockerfile,下面是Dockerfile在碼頭集裝箱中安裝貓鼬
# Official node base image
FROM node:0.12
# Bundle app source
COPY . /src
RUN apt-get update && apt-get install -y --no-install-recommends libkrb5-dev supervisor \
&& cd /src \
&& npm install \
&& rm -rf /var/lib/apt/lists/*
# copy the supervisor conf file
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Exclude npm cache from the image
VOLUME /root/.npm
# expose environment variable
EXPOSE 3300
# start supervisor
CMD ["/usr/bin/supervisord"]
的內容,但在運行NPM install命令我看到下列警告在日誌中
> [email protected] install /rate-my-ride-users-api/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)
make: Entering directory '/rate-my-ride-users-api/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build'
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
CXX(target) Release/obj.target/kerberos/lib/worker.o
CC(target) Release/obj.target/kerberos/lib/kerberosgss.o
../lib/kerberosgss.c:27:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
#pragma clang diagnostic push
^
../lib/kerberosgss.c:28:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
^
../lib/kerberosgss.c: In function 'authenticate_gss_client_wrap':
../lib/kerberosgss.c:348:19: warning: variable 'server_conf_flags' set but not used [-Wunused-but-set-variable]
char buf[4096], server_conf_flags;
^
../lib/kerberosgss.c: At top level:
../lib/kerberosgss.c:687:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
#pragma clang diagnostic pop
我敲我的頭掛在牆上,因爲12小時,我幾乎在網上搜索了一切,但我無法找出發生這種情況的原因。在某處我讀到我需要libkrb5-dev
軟件包,所以我也安裝了該軟件包,但問題仍然存在。
任何人都可以向我解釋這裏發生了什麼?以及我如何解決這個問題?
我知道這一點,我的問題是,爲什麼有這些警告,這些警告是不是有當我(不搬運工圖像) – Syed
本地安裝我更新了我的答案以及關於這些編譯指示的更多信息。 – PatrickD
我使用的是我的本地和根據[此] mac(http://stackoverflow.com/questions/20171095/why-cant-i-check-my-version-of-gcc-compiler-on-os-x )問題,mac使用clang。 – Syed