зеркало из https://github.com/telerik/docs-seed.git
feat: Setting UTF-8 to docker locale and installing NodeJS
This commit is contained in:
Родитель
cd25e75e1f
Коммит
83fe54b93d
29
Dockerfile
29
Dockerfile
|
@ -1,5 +1,18 @@
|
|||
FROM ruby:2.3.5
|
||||
|
||||
RUN apt-get -qq update && \
|
||||
apt-get -q -y upgrade && \
|
||||
apt-get install -y sudo curl wget locales && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN locale-gen C.UTF-8
|
||||
|
||||
RUN ls
|
||||
RUN chmod 0755 /etc/default/locale
|
||||
ENV LC_ALL=C.UTF-8
|
||||
ENV LANG=C.UTF-8
|
||||
ENV LANGUAGE=C.UTF-8
|
||||
|
||||
ENV APP_ROOT /app_root
|
||||
|
||||
# By adding Gemfiles and invoke bundle install before copy all files we are using container cache for gems.
|
||||
|
@ -9,6 +22,22 @@ ADD Gemfile.lock ${APP_ROOT}/
|
|||
WORKDIR ${APP_ROOT}
|
||||
RUN bundle check || bundle install
|
||||
|
||||
# Installing NodeJS
|
||||
RUN apt-get -y install curl gnupg
|
||||
RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
|
||||
RUN apt-get -y install nodejs
|
||||
|
||||
|
||||
RUN locale-gen en_US.UTF-8 \
|
||||
&& locale-gen en en_US en_US.UTF-8 \
|
||||
&& dpkg-reconfigure locales
|
||||
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US.UTF-8
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
RUN locale -a
|
||||
|
||||
COPY . ${APP_ROOT}
|
||||
|
||||
EXPOSE 4000
|
||||
|
|
1
Gemfile
1
Gemfile
|
@ -15,3 +15,4 @@ gem "bootstrap-sass"
|
|||
gem "oga", "~> 2.3"
|
||||
gem 'html-pipeline'
|
||||
gem 'github-markdown'
|
||||
gem 'execjs'
|
||||
|
|
|
@ -16,6 +16,10 @@ if [ ! -z "$2" ]
|
|||
fi
|
||||
|
||||
rm -rf _site/ .sass-cache .jekyll-cache .asset-cache
|
||||
docker pull progressdocs/docs-seed:site
|
||||
docker build -t progressdocs/docs-seed:site .
|
||||
docker run --rm --env CONFIG_FILE=$config_file --env JEKYLL_COMMAND=build --env JEKYLL_EXTRA=$debug_params -t -v "/$(pwd):/app_root" -t progressdocs/docs-seed:site
|
||||
docker pull progressdocs/docs-seed:2.2
|
||||
docker build -t progressdocs/docs-seed:2.2 .
|
||||
docker run --rm --env CONFIG_FILE=$config_file --env JEKYLL_COMMAND=build --env JEKYLL_EXTRA=$debug_params \
|
||||
--env LANG=C.UTF-8 \
|
||||
--env LANGUAGE=C.UTF-8 \
|
||||
--env LC_ALL=C.UTF-8 \
|
||||
-t -v "/$(pwd):/app_root" -t progressdocs/docs-seed:2.2
|
||||
|
|
|
@ -9,6 +9,12 @@ fi
|
|||
echo "Using configuration from: $config_file"
|
||||
|
||||
rm -rf _site/ .sass-cache .jekyll-cache .asset-cache
|
||||
docker pull progressdocs/docs-seed:site
|
||||
docker build -t progressdocs/docs-seed:site .
|
||||
docker run --rm -it --env CONFIG_FILE=$config_file --env JEKYLL_COMMAND="serve" --env JEKYLL_EXTRA="--watch --incremental --host 0.0.0.0" --name docs_site -t -i -v /$(pwd):/app_root -p 4000:4000 -t progressdocs/docs-seed:site
|
||||
docker pull progressdocs/docs-seed:2.2
|
||||
docker build -t progressdocs/docs-seed:2.2 .
|
||||
docker run --rm -it \
|
||||
--env CONFIG_FILE=$config_file --env JEKYLL_COMMAND="serve" --env JEKYLL_EXTRA="--watch --incremental --host 0.0.0.0" \
|
||||
--env LANG=C.UTF-8 \
|
||||
--env LANGUAGE=C.UTF-8 \
|
||||
--env LC_ALL=C.UTF-8 \
|
||||
--name docs_site -t -i -v /$(pwd):/app_root -p 4000:4000 \
|
||||
-t progressdocs/docs-seed:2.2
|
||||
|
|
Загрузка…
Ссылка в новой задаче