-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (33 loc) · 1.09 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
FROM mhart/alpine-node:latest
MAINTAINER [email protected]
# set our environment
ENV APP_ENV='DEVELOPMENT'
# ENV APP_ENV='PRODUCTION'
ENV NPMPROXY_TCP_PORT=4873
# install base packages - BASH should only be used for debugging, it's almost a meg in size
# install ca-certificates
# clean up the apk cache (no-cache still caches the indexes)
# update the ca-certificates
RUN apk --update --no-cache add \
ca-certificates \
build-base \
python \
python-dev \
py-pip && \
rm -rf /var/cache/apk/* && \
update-ca-certificates
COPY entrypoint.sh /entrypoint.sh
RUN adduser -D -S -s /bin/sh -h /npmproxy npmproxy && \
chmod a+x /entrypoint.sh && \
mkdir -p /npmproxy/storage && \
chmod a+rw /npmproxy/storage
WORKDIR /npmproxy
# RUN npm install js-yaml sinopia2 sinopia-github-oauth sinopia-github && \
RUN npm install js-yaml sinopia2 sinopia-github
COPY docker.yaml /npmproxy/config.yaml
COPY cli.js /npmproxy/node_modules/sinopia2/lib/cli.js
VOLUME ["/npmproxy/storage"]
# the entry point definition
ENTRYPOINT ["/entrypoint.sh"]
# default command for entrypoint.sh
CMD ["npmproxy"]