我使用 go 作为应用程序的后端,使用 Angular js 作为应用程序的前端,为了能够运行前端,我应该首先运行 Bower install。
注意:我正在从 centos7 基础镜像构建镜像。
我尝试将其添加到 RUN 命令的 docker 文件中,如下所示
WORKDIR ./Frontend
RUN bower install
我收到一个错误:
/bin/sh: bower: command not found
有人知道我该如何解决这个问题吗?
最佳答案
你应该看看https://github.com/marmelab/docker-bower/blob/master/Dockerfile
我明白了,除其他外
RUN apt-get install -y -qq npm
RUN ln -s /usr/bin/nodejs /usr/bin/node
# install bower
RUN npm install --global bower
关于angularjs - 如何在 Dockerfile 中运行 Bower install?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39845687/