-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebsite.dockerfile
46 lines (38 loc) · 2.16 KB
/
website.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
################################################################################
########## ██╗ ██╗███████╗██╗ ██╗██╗ ██╗ ##############
########## ██║ ██║██╔════╝██║ ██║╚██╗██╔╝ ##############
########## ███████║█████╗ ██║ ██║ ╚███╔╝ ##############
########## ██╔══██║██╔══╝ ██║ ██║ ██╔██╗ ##############
########## ██║ ██║███████╗███████╗██║██╔╝ ██╗ ##############
########## ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ ##############
################################################################################
# Docker image of the Helix Website
# Based on Alpine Linux (https://hub.docker.com/_/alpine)
# and NGINX (https://hub.docker.com/_/nginx)
# Repository: https://github.com/Xavier2p/helix
# License: GPL-3.0
# Author: Xavier2p <contact.helix@skiff.com>
# Image published at: https://ghcr.io/xavier2p/helix-website
################################################################################
# Builder from Node
################################################################################
FROM alpine:latest AS builder
RUN apk add --update npm
################################################################################
# Build Website
################################################################################
FROM builder AS build
WORKDIR /helix-website
# Install packages
COPY ./website/package*.json ./
RUN npm clean-install
# Copy and build the project
COPY ./website/* .
RUN npm run docker
################################################################################
# Build Final Image
################################################################################
FROM nginx:alpine AS production
# state to verify
WORKDIR /usr/share/nginx/html/
COPY --from=build /helix-website/dist .