Hexo Blog build environment image deployed in Raspberry Pi
82
# Build environment
FROM crazybun/hexo-build-env AS build-env
# Create a blog folder and set it to a working folder
RUN mkdir -p /usr/src/hexo-blog
WORKDIR /usr/src/hexo-blog
# Copy everything in your Hexo folder here
COPY . .
# Generate static files
RUN hexo clean && hexo g
# Configure the nginx
FROM nginx:latest
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /usr/share/nginx/html
# Copy the static files generated in the previous section to the Nginx
COPY --from=build-env /usr/src/hexo-blog/public /usr/share/nginx/html
EXPOSE 80
Content type
Image
Digest
Size
362.4 MB
Last updated
over 5 years ago
docker pull crazybun/hexo-build-env:node-12