【发布时间】:2016-07-23 19:53:53
【问题描述】:
我是 AWS elastic beanstalk 的用户,我有一个小问题。我想用less+node 构建我的CSS 文件。但是在使用 jenkins 构建时,我不知道如何在我的 dockerfile 中安装节点。
这是我在 docker 中使用的安装包。如果有任何建议,我会很高兴。
FROM php:5.6-apache
# Install PHP5 and modules along with composer binary
RUN apt-get update
RUN apt-get -y install \
curl \
default-jdk \
git \
libcurl4-openssl-dev \
libpq-dev \
libmcrypt-dev \
libpq5 \
npm \
node \
zlib1g-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
RUN docker-php-ext-install curl json mbstring opcache pdo_mysql zip gd exif sockets mcrypt
# Install pecl
RUN pecl install -o -f memcache-beta \
&& rm -rf /tmp/pear \
&& echo 'extension=memcache.so' > /usr/local/etc/php/conf.d/memcache.ini
在此之后,我正在使用代码运行我的 entrypoint.sh
#!/usr/bin/env sh
composer run-script post-install-cmd --no-interaction
chmod 0777 -R /var/app/app/cache
chmod 0777 -R /var/app/app/logs
exec apache2-foreground
但是我得到了这个错误
Error Output: [2016-04-04 11:23:44] assetic.ERROR: The template ":tmp:module.html.twig" contains an error: A template that extends another one cannot have a body in ":tmp:module.ht
ml.twig" at line 7.
但是当我以这种方式安装在 Docker 容器节点中时
apt-get install git-core curl build-essential openssl libssl-dev
git clone https://github.com/nodejs/node.git
cd node
./configure
make
sudo make install
node -v
我可以构建我的 CSS。所以问题是..当我用 Jenkins 构建它时,上面的这个安装如何在我的 Dockerfile 中进行安装?
【问题讨论】:
标签: node.js amazon-web-services jenkins docker less