-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (35 loc) · 912 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM mhart/alpine-node:latest
# Install required dependencies (Alpine Linux packages)
RUN apk update && \
apk add --no-cache \
sudo \
g++ \
gcc \
git \
libev-dev \
libevent-dev \
libuv-dev \
make \
openssl-dev \
perl \
python
# Add user and make it sudoer
ARG uid=1000
ARG user=u1
RUN adduser -DS -u $uid $user
RUN echo $user' ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Switch to directory for external dependencies (installed from source)
#WORKDIR /home/llyppp/node
# Install (global) NPM packages/dependencies
#RUN npm install
#RUN npm run build && npm start
RUN npm install --quiet node-gyp -g
# Make project directory with permissions
#RUN mkdir /project
# Switch to project directory
#WORKDIR /project
# Copy required stuff
COPY ./start.sh /
ENTRYPOINT ["sh","/start.sh"]
# Install (local) NPM packages and build
#RUN npm install && npm run postinstall