Build 在Docker容器中编译libsas
因此,我有以下Dockerfile:Build 在Docker容器中编译libsas,build,sass,libsass,Build,Sass,Libsass,因此,我有以下Dockerfile: ############################################################ # Based on Ubuntu ############################################################ FROM ubuntu:trusty MAINTAINER OTIS WRIGHT # Add extra software sources RUN apt-get updat
############################################################
# Based on Ubuntu
############################################################
FROM ubuntu:trusty
MAINTAINER OTIS WRIGHT
# Add extra software sources
RUN apt-get update -qq
# Libsass requirements.
RUN apt-get install -y curl git build-essential automake libtool
# Fetch sources
RUN git clone https://github.com/sass/libsass.git
RUN git clone https://github.com/sass/sassc.git libsass/sassc
# Create configure script
RUN cd libsass
RUN autoreconf --force --install
RUN cd ..
# Create custom makefiles for **shared library**, for more info read:
# 'Difference between static and shared libraries?' before installing libsass http://stackoverflow.com/q/2649334/802365
RUN cd libsass
RUN autoreconf --force --install
RUN ./configure --disable-tests --enable-shared --prefix=/usr
RUN cd ..
# Build the library
RUN make -C libsass -j5
# Install the library
RUN make -C libsass -j5 install
我正试图基于以下要点构建libsass
:
但是,当我尝试使用docker构建时,会出现以下错误:
Step 11 : RUN git clone https://github.com/sass/libsass.git
---> Using cache
---> d1a4eef78fa5
Step 12 : RUN git clone https://github.com/sass/sassc.git libsass/sassc
---> Using cache
---> 435410579641
Step 13 : RUN cd libsass
---> Using cache
---> f0a4df503d85
Step 14 : RUN autoreconf --force --install
---> Running in a9b0d51d6ee3
autoreconf: 'configure.ac' or 'configure.in' is required
The command '/bin/sh -c autoreconf --force --install' returned a non-zero code: 1
我对从源代码进行编译了解不多,所以任何解决方案都请带我看。Docker不会为您更改目录
运行cd-libsass
,因此您需要设置命令路径或使用WORKDIR
指令@edouardlopez:检查一下