Sign inSign up

crazybun/hexo-build-env

By crazybun

Updated over 5 years ago

Hexo Blog build environment image deployed in Raspberry Pi

Image
0

82

crazybun/hexo-build-env repository overview

Info

  • Node 12
  • Hexo 4.2

Usage

# 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

Tag summary

Content type

Image

Digest

Size

362.4 MB

Last updated

over 5 years ago

docker pull crazybun/hexo-build-env:node-12