-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
31 lines (25 loc) · 1.03 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
FROM node:10.1-alpine
LABEL maintainer "unfetter"
LABEL Description="TAXII server for unfetter"
# Create Application Directory
ENV WORKING_DIRECTORY /usr/share/unfetter-taxii-server
RUN mkdir -p $WORKING_DIRECTORY
WORKDIR $WORKING_DIRECTORY
COPY docker/set-linux-repo.sh $WORKING_DIRECTORY
COPY docker/set-npm-repo.sh $WORKING_DIRECTORY
RUN chmod 700 $WORKING_DIRECTORY/*.sh
RUN $WORKING_DIRECTORY/set-linux-repo.sh
RUN $WORKING_DIRECTORY/set-npm-repo.sh
# Install Dependencies
# COPY package-lock.json $WORKING_DIRECTORY
COPY package.json $WORKING_DIRECTORY
# The NPM package depends on TAR package, which has a test directory with an encrypted tgz file, that gets blocked by some antivirus scanners. Removing it.
RUN npm --loglevel error install && \
find / -name "cb-never*.tgz" -delete && \
rm -rf /usr/share/man && \
rm -rf /tmp/* && \
rm -rf /var/cache/apk/* && \
rm -rf /usr/lib/node_modules/npm/man && \
rm -rf /usr/lib/node_modules/npm/doc && \
rm -rf /usr/lib/node_modules/npm/html
COPY . $WORKING_DIRECTORY