-
Notifications
You must be signed in to change notification settings - Fork 171
/
Dockerfile
28 lines (21 loc) · 981 Bytes
/
Dockerfile
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
# Dockerfile for checking local changes made to the oss2018 site using hugo.
# Run the following commands to setup this docker
# docker pull ubuntu:16.04
# git clone https://github.com/OpenSecuritySummit/oss2018.git
# cd oss2018 && git clone https://github.com/devcows/hugo-universal-theme.git themes/oss-owasp
# docker build -t oss2018 .
# docker run -it -p 1313:1313 -v $(pwd):/opt/oss2018 oss2018:latest
FROM ubuntu:16.04
MAINTAINER Mohammed A. Imran <[email protected]>
ENV HUGO_VERSION="0.36.1"
ENV SRC_DIR="/opt/oss2018"
RUN apt-get update \
&& apt-get install -y curl git \
&& adduser --disabled-password --gecos "oss" oss \
&& curl -Ls https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -o /tmp/hugo.tar.gz \
&& tar xf /tmp/hugo.tar.gz -C /usr/local/bin \
&& mkdir -p $SRC_DIR
WORKDIR $SRC_DIR
ADD --chown=oss:oss . $SRC_DIR
USER oss:oss
ENTRYPOINT hugo server --bind="0.0.0.0"