Optimize Dockerfile (#1700)
This commit is contained in:
parent
ea7e6a38ff
commit
b838eff2b1
33
Dockerfile
33
Dockerfile
|
|
@ -2,24 +2,24 @@ FROM bitnami/minideb:latest
|
||||||
|
|
||||||
Label MAINTAINER Amir Pourmand
|
Label MAINTAINER Amir Pourmand
|
||||||
|
|
||||||
RUN apt-get update -y
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
||||||
|
locales \
|
||||||
|
imagemagick \
|
||||||
|
ruby-full \
|
||||||
|
build-essential \
|
||||||
|
zlib1g-dev \
|
||||||
|
python3-pip && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
# add locale
|
|
||||||
RUN apt-get -y install locales
|
|
||||||
# Set the locale
|
|
||||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
|
||||||
locale-gen
|
locale-gen
|
||||||
ENV LANG en_US.UTF-8
|
|
||||||
ENV LANGUAGE en_US:en
|
|
||||||
ENV LC_ALL en_US.UTF-8
|
|
||||||
|
|
||||||
# add ruby and jekyll
|
ENV LANG=en_US.UTF-8 \
|
||||||
RUN apt-get install --no-install-recommends ruby-full build-essential zlib1g-dev -y
|
LANGUAGE=en_US:en \
|
||||||
RUN apt-get install imagemagick -y
|
LC_ALL=en_US.UTF-8 \
|
||||||
|
JEKYLL_ENV=production
|
||||||
|
|
||||||
# install python3 and jupyter
|
RUN python3 -m pip install jupyter --break-system-packages --no-cache-dir
|
||||||
RUN apt-get install python3-pip -y
|
|
||||||
RUN python3 -m pip install jupyter --break-system-packages
|
|
||||||
|
|
||||||
# install jekyll and dependencies
|
# install jekyll and dependencies
|
||||||
RUN gem install jekyll bundler
|
RUN gem install jekyll bundler
|
||||||
|
|
@ -30,11 +30,8 @@ ADD Gemfile /srv/jekyll
|
||||||
|
|
||||||
WORKDIR /srv/jekyll
|
WORKDIR /srv/jekyll
|
||||||
|
|
||||||
RUN bundle install
|
RUN bundle install --no-cache
|
||||||
|
# && rm -rf /var/lib/gems/3.1.0/cache
|
||||||
# Set Jekyll environment
|
|
||||||
ENV JEKYLL_ENV=production
|
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
CMD ["/bin/bash", "-c", "rm -f Gemfile.lock && exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace"]
|
CMD ["/bin/bash", "-c", "rm -f Gemfile.lock && exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue