下面是我的dockerfile,当我运行命令docker build -t image-name .
时,它给我错误为The command '/bin/sh -c gem install jekyll' returned a non-zero code: 1
我已经从网上复制了dockerfile并添加到我的静态站点,但不确定要更改什么才能构建映像并运行,请问有人可以帮我吗?
FROM ruby:2.4.1 as jekyll-base
#RUN apk-get add --no-cache build-base gcc bash cmake git
RUN gem install jekyll
EXPOSE 4000
WORKDIR /site
ENTRYPOINT [ "bundle", "exec", "jekyll" ]
CMD [ "--help" ]
##
##
## New stage in multi-stage image
FROM jekyll-base
# create new site by setting -e JEKYLL_NEW=true
ENV JEKYLL_NEW false
#COPY docker-entrypoint.sh /usr/local/bin/
#
## on every container start we'l'
#ENTRYPOINT [ "docker-entrypoint.sh" ]
CMD [ "bundle", "exec", "jekyll", "serve", "--force_polling", "-H", "0.0.0.0", "-P", "4000" ]