-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
executable file
·45 lines (36 loc) · 1.29 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
# Original source from https://hub.docker.com/_/node/
FROM node:current-alpine
LABEL maintainer="Martin DSouza <[email protected]>"
# NPM_CONFIG_PREFIX: See below
# PATH: Required for ask cli location
ENV TZ="GMT" \
NPM_CONFIG_PREFIX=/home/node/.npm-global \
PATH="${PATH}:/home/node/.npm-global/bin/:/home/node/.local/bin/"
# Required pre-reqs for ask cli
RUN apk add --update \
python \
make \
bash \
py-pip
# See https://github.com/nodejs/docker-node/issues/603
# ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
WORKDIR /app
USER node
# /home/node/.ask: For ask CLI configuration file
# /home/node/.ask: Folder to map to for app development
RUN npm install -g ask-cli && \
mkdir /home/node/.ask && \
mkdir /home/node/.aws && \
mkdir /home/node/app && \
pip install awscli --upgrade --user
# Patch for https://github.com/martindsouza/docker-amazon-ask-cli/issues/1
WORKDIR /$NPM_CONFIG_PREFIX/lib/node_modules/ask-cli
RUN npm install [email protected] --save-exact
# Volumes:
# /home/node/.ask: This is the location of the ask config folder
# /home/node/app: Your development folder
VOLUME ["/home/node/.ask", "/home/node/.aws", "/home/node/app"]
# Enable this if you want the container to permanently run
# CMD ["/bin/bash"]
# Default folder for developers to work in
WORKDIR /home/node/app