-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
77 lines (62 loc) · 1.35 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM node:lts-alpine
# ##############################################################
# Copyright (c) 2021 Sujaykumar.Hublikar <[email protected]>
# Licensed under the Apache License, Version 2.0
# ##############################################################
#####
## Docker labels
#####
LABEL maintainer="sujaykumarh" \
name="docsify" \
copyright="Copyright (c) 2021 sujaykumarh." \
license="Apache License, Version 2.0" \
description="Docsify run env."
#####
## Default shell profile
#####
COPY custom/profile.sh /etc/profile
#####
## Setup Entrypoint
#####
# Copy Entrypoint
COPY ./docker-entrypoint.sh /usr/bin/custom-docker-entrypoint.sh
# make executable
RUN chmod 755 /usr/bin/custom-docker-entrypoint.sh
#####
## ADD default USER
#####
RUN addgroup -g 1010 app && \
adduser -D -G app -g app -s /bin/ash app -h /docs
#####
## Default packages
#####
RUN apk add --no-cache \
figlet
#####
## Install npm packages
#####
RUN npm install --no-optional -g \
docsify-cli@latest
#####
## Set Working Dir
#####
WORKDIR /docs
#####
## Expose ports
#####
# Default Port of Docsify
EXPOSE 3000/tcp
# Default port of live-server npm
EXPOSE 35729/tcp
#####
## Default Entry Point
#####
ENTRYPOINT [ "/usr/bin/custom-docker-entrypoint.sh" ]
#####
## Set Default Non-Root User
#####
USER app
#####
## Default command
#####
# CMD