0

我想在 docker 上运行小鸭。所以我正在使用这个 docker 文件

FROM haskell:8 AS builder

RUN apt-get update -qq && \
  apt-get install -qq -y libssl-dev libpcre3 libpcre3-dev build-essential --fix-missing --no-install-recommends && \
  apt-get clean && \
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN mkdir /log

WORKDIR /duckling

COPY . .

ENV LANG=C.UTF-8

RUN stack setup

# NOTE:`stack build` will use as many cores as are available to build
# in parallel. However, this can cause OOM issues as the linking step
# in GHC can be expensive. If the build fails, try specifying the
# '-j1' flag to force the build to run sequentially.
RUN stack install

FROM debian:buster

ENV LANG C.UTF-8

RUN apt-get update -qq && \
  apt-get install -qq -y libpcre3 libgmp10 libssl-dev --no-install-recommends && \
  apt-get clean && \
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=builder /root/.local/bin/duckling-example-exe /usr/local/bin/

EXPOSE 8000

CMD ["duckling-example-exe", "-p", "8000", "--no-access-log", "--no-error-log"]

当我使用

docker build --tag duckling:latest .

表明

=> [stage-1 2/3] RUN apt-get update -qq &&   apt-get install -qq -y libpcre3 libgmp10 libssl-dev --no-install-r  45.0s
 => [builder 2/7] RUN apt-get update -qq &&   apt-get install -qq -y libssl-dev libpcre3 libpcre3-dev build-esse  11.0s
 => [builder 3/7] RUN mkdir /log                                                                                   0.3s
 => [builder 4/7] WORKDIR /duckling                                                                                0.1s
 => [builder 5/7] COPY . .                                                                                        19.3s
 => [builder 6/7] RUN stack setup                                                                                 73.7s
 => ERROR [builder 7/7] RUN stack install                                                                          0.8s
------
 > [builder 7/7] RUN stack install:
#14 0.730 Error parsing targets: The specified targets matched no packages.
#14 0.730 Perhaps you need to run 'stack init'?
------
executor failed running [/bin/sh -c stack install]: exit code: 1

有什么帮助吗?

4

0 回答 0