mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-04-14 10:25:40 +00:00
46 lines
1.3 KiB
Docker
46 lines
1.3 KiB
Docker
FROM debian:jessie
|
|
|
|
VOLUME ["/site"]
|
|
|
|
RUN apt-get -qq update \
|
|
&& apt-get install -y curl apt-transport-https \
|
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
|
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends \
|
|
python-pygments git ca-certificates asciidoc nodejs yarn \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Download and install hugo
|
|
ENV HUGO_VERSION 0.37.1
|
|
ENV HUGO_BINARY hugo_${HUGO_VERSION}_Linux-64bit.deb
|
|
|
|
ADD https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} /tmp/hugo.deb
|
|
RUN dpkg -i /tmp/hugo.deb \
|
|
&& rm /tmp/hugo.deb
|
|
|
|
# Create working directory
|
|
RUN mkdir -p /run
|
|
COPY package.json /run/
|
|
WORKDIR /run
|
|
|
|
RUN npm install -g gulp && yarn
|
|
|
|
RUN ln -s /site/config.toml /run \
|
|
&& ln -s /site/.eslintrc.js /run \
|
|
&& ln -s /site/netlify.toml /run \
|
|
&& ln -s /site/archetypes /run \
|
|
&& ln -s /site/content /run \
|
|
&& ln -s /site/data /run \
|
|
&& ln -s /site/layouts /run \
|
|
&& ln -s /site/src /run \
|
|
&& ln -s /site/themes /run
|
|
|
|
COPY gulpfile.babel.js /run/
|
|
|
|
# Expose default hugo port
|
|
EXPOSE 9000
|
|
|
|
ENTRYPOINT ["gulp"]
|
|
CMD ["dev"]
|