-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 806 Bytes
/
Dockerfile
File metadata and controls
34 lines (26 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM debian
# Take variables defined in DO
ARG AlgoliaAPIKey
ARG AlgoliaAppID
ARG HUGO_VERSION
ARG OpenATIndexName
# This is a shell trick to allow nvm to work
SHELL [ "/bin/bash", "-l", "-c" ]
# Copy git repo
WORKDIR /app
COPY . .
# Install node (via version manager)
RUN apt-get update && apt-get install -y curl
RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
RUN nvm install
RUN nvm use 10
# Install deps
RUN npm install
# Run scripts
RUN npm run get-awesome
RUN npm run reindex
# Download Hugo
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.20/hugo_0.20_Linux-64bit.tar.gz --output ./hugo_0.20_Linux-64bit.tar.gz
RUN tar -xf ./hugo_0.20_Linux-64bit.tar.gz
# Run hugo
RUN ./hugo_0.20_linux_amd64/hugo_0.20_linux_amd64 -b "/"