|
|
@ -2,6 +2,8 @@ FROM ubuntu:latest |
|
|
|
|
|
|
|
MAINTAINER wes kerfoot "wjak56@gmail.com" |
|
|
|
|
|
|
|
RUN mkdir -p /{styles,scripts} && mkdir -p /src |
|
|
|
|
|
|
|
RUN apt-get update -y |
|
|
|
RUN apt-get install -y curl |
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash |
|
|
@ -9,20 +11,27 @@ RUN apt-get update -y |
|
|
|
RUN apt-get install -y python3-pip python3-dev build-essential sassc jq nodejs |
|
|
|
RUN npm install -g uglifycss uglifyjs |
|
|
|
|
|
|
|
COPY . ./src |
|
|
|
COPY run.sh /run.sh |
|
|
|
COPY blogPosts.json /blogPosts.json |
|
|
|
COPY requirements.txt /requirements.txt |
|
|
|
RUN pip3 install -r /requirements.txt |
|
|
|
|
|
|
|
COPY package-lock.json package.json / |
|
|
|
RUN npm install |
|
|
|
|
|
|
|
COPY rollup.config.riotblog.js rollup.config.editor.js /scripts/ |
|
|
|
COPY link.json list.js admin.py posts.py projects.py website.py ./src/ |
|
|
|
|
|
|
|
WORKDIR /src |
|
|
|
# Docker has ridiculous behaviour with regards to COPY |
|
|
|
# COPY foo bar /baz/ won't actually copy the directories, but their contents |
|
|
|
COPY templates /src/templates |
|
|
|
COPY images /src/images |
|
|
|
COPY blogPosts.json run.sh / |
|
|
|
|
|
|
|
RUN npm install && pip3 install -r /src/requirements.txt && \ |
|
|
|
mkdir -p ./build/styles ./build/scripts && \ |
|
|
|
npm run-script build_riotblog && \ |
|
|
|
npm run-script build_editor |
|
|
|
COPY scripts /scripts |
|
|
|
RUN npm run-script build_riotblog && npm run-script build_editor |
|
|
|
|
|
|
|
RUN sassc ./styles/riotblog.scss > ./styles/riotblog.intermediate.min.css && \ |
|
|
|
cp ./styles/*.css ./build/styles/ && \ |
|
|
|
uglifycss ./styles/*.css > ./build/styles/riotblog.min.css |
|
|
|
COPY styles /styles |
|
|
|
RUN sassc /styles/riotblog.scss > /styles/riotblog.intermediate.min.css && \ |
|
|
|
uglifycss /styles/*.css > /styles/riotblog.min.css |
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/bash", "/run.sh"] |
|
|
|
CMD ["/src/website.py"] |
|
|
|