docker ubuntu /bin/sh: 1: locale-gen: not found

2019-03-08 17:01发布

I put the locale setting codes below into my dockerfile,

FROM node:4-onbuild

# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

but it gives me the error

/bin/sh: 1: locale-gen: not found
The command '/bin/sh -c locale-gen en_US.UTF-8' returned a non-zero code: 127

any idea?

标签: ubuntu docker
1条回答
乱世女痞
2楼-- · 2019-03-08 17:44

Thanks for your comment, edwinksl. I updated my dockerfile below which solved the locale-gen error:

FROM node:4-onbuild

# Set the locale
RUN apt-get clean && apt-get update && apt-get install -y locales
RUN locale-gen en_US.UTF-8
查看更多
登录 后发表回答