我正在尝试构建一个包含 oracledb 客户端和 nodejs 的 docker 映像,但The command '/bin/sh -c ldconfig' returned a non-zero code: 1在RUN ldconfig.
我找不到任何东西来帮助我解决这个问题,过去 2 个小时我一直在尝试自己解决这个问题,我需要帮助!
附加信息:
奇怪的是,当我进入容器docker exec -it container_name sh然后执行时ldconfig,它运行良好......
这是dockerfile:
FROM node:9.11-alpine
WORKDIR /
COPY ./oracle /opt/oracle
RUN apk update && \
apk add --no-cache libaio && \
mkdir /etc/ld.so.conf.d && \
sh -c "echo /opt/oracle/instantclient_12_2 > /etc/ld.so.conf.d/oracle-instantclient.conf" && \
ldconfig
ENV LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH
ENV PATH=/opt/oracle/instantclient_12_2:$PATH
CMD ["tail", "-f", "/dev/null"]
Run Code Online (Sandbox Code Playgroud)
在 alpine 中ldconfig需要配置目录作为参数。
尝试ldconfig像这样运行:
ldconfig /etc/ld.so.conf.d
Run Code Online (Sandbox Code Playgroud)
理论上应该可行。
| 归档时间: |
|
| 查看次数: |
2670 次 |
| 最近记录: |