【问题标题】:Compiling libsass in Docker container在 Docker 容器中编译 libsass
【发布时间】:2016-02-19 07:03:51
【问题描述】:

所以我有以下 Dockerfile:

############################################################
# 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

我正在尝试根据以下要点构建libsasshttps://gist.github.com/edouard-lopez/503d40a5c1a49cf8ae87

但是,当我尝试使用 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

我对从源代码编译了解不多,因此请提供任何解决方案。

【问题讨论】:

  • @edouardlopez:检查一下

标签: build sass libsass


【解决方案1】:

Docker 不会为您更改目录RUN cd libsass,因此您需要为您的命令设置路径或使用 WORKDIR 指令

【讨论】:

    猜你喜欢
    • 2014-09-15
    • 1970-01-01
    • 1970-01-01
    • 2019-10-17
    • 1970-01-01
    • 1970-01-01
    • 2020-07-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多