cleanup
This commit is contained in:
parent
5ff1a998e6
commit
940e0c92b4
15
Dockerfile
15
Dockerfile
|
@ -1,6 +1,5 @@
|
||||||
FROM docker-registry1.in.thelinuxpro.net:5000/tlp/tlp_jekyll:0.0.1
|
FROM docker-registry1.in.thelinuxpro.net:5000/tlp/tlp_jekyll:0.0.1
|
||||||
|
|
||||||
LABEL version="0.0.1"
|
|
||||||
LABEL image.author.name="Kameron Kenny"
|
LABEL image.author.name="Kameron Kenny"
|
||||||
LABEL image.author.email="kameron@localhost"
|
LABEL image.author.email="kameron@localhost"
|
||||||
LABEL description="A Jekyll site for photos.kameronkenny.com."
|
LABEL description="A Jekyll site for photos.kameronkenny.com."
|
||||||
|
@ -10,6 +9,8 @@ ARG LOCATION_JEKYLL="/usr/local/jekyll"
|
||||||
ENV GEM_HOME="/usr/local/gems"
|
ENV GEM_HOME="/usr/local/gems"
|
||||||
ENV PATH="/usr/local/gems/bin:$PATH"
|
ENV PATH="/usr/local/gems/bin:$PATH"
|
||||||
ENV SITE="photos.kameronkenny.com"
|
ENV SITE="photos.kameronkenny.com"
|
||||||
|
ENV SITE_ROOT="$LOCATION_JEKYLL/sites/$SITE
|
||||||
|
ENV SITE_PATH="$SITE_ROOT/_site"
|
||||||
ENV NGINX_CONF_D="$LOCATION_JEKYLL/nginx"
|
ENV NGINX_CONF_D="$LOCATION_JEKYLL/nginx"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -20,7 +21,7 @@ RUN apt install -y libmagick++-dev
|
||||||
### Shouldn't need this, it's in the Gemfile, but hold just in case.
|
### Shouldn't need this, it's in the Gemfile, but hold just in case.
|
||||||
#RUN gem install rmagick exifr
|
#RUN gem install rmagick exifr
|
||||||
|
|
||||||
RUN mkdir -p $LOCATION_JEKYLL/sites/$SITE
|
RUN mkdir -p $SITE_ROOT
|
||||||
|
|
||||||
WORKDIR /usr/local/sbin
|
WORKDIR /usr/local/sbin
|
||||||
COPY ./entrypoint.sh .
|
COPY ./entrypoint.sh .
|
||||||
|
@ -34,4 +35,14 @@ COPY . .
|
||||||
RUN bundle install
|
RUN bundle install
|
||||||
RUN JEKYLL_ENV=production bundle exec jekyll build
|
RUN JEKYLL_ENV=production bundle exec jekyll build
|
||||||
|
|
||||||
|
## Cleanup to debulk the image
|
||||||
|
|
||||||
|
RUN apt remove -y manpages ruby x11-common ruby* make python gcc cpp gnupg git git-man
|
||||||
|
RUN apt -y autoremove
|
||||||
|
RUN test -d $SITE_PATH && for i in $(ls -1 $SITE_ROOT | grep -v _site); do rm -rf $SITE_ROOT/$i ; done
|
||||||
|
RUN rm -rf /root/.bundle/cache
|
||||||
|
RUN rm -rf /var/cache
|
||||||
|
RUN rm -rf /var/lib/apt
|
||||||
|
RUN rm -rf /var/lib/dpkg
|
||||||
|
|
||||||
ENTRYPOINT /usr/local/sbin/entrypoint.sh
|
ENTRYPOINT /usr/local/sbin/entrypoint.sh
|
||||||
|
|
Loading…
Reference in New Issue