-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (41 loc) · 1.28 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
# DOCKER-VERSION 1.8.2
#
# React Native Webpack Starter Kit
# https://github.com/jhabdas/react-native-webpack-starter-kit
#
# Demonstrates use of Starter Kit in a virtualized Linux development environment.
# Helps enable React Native development for Windows. OS X workflows also possible.
# Pull base image
FROM node:argon
# Set environment variables
ENV NODE_ENV development
ENV KIT_VERS v2.28.0
ENV WATCHMAN_VERS v4.5.0
# Fetch and install
RUN \
cd /tmp && \
wget https://github.com/jhabdas/react-native-webpack-starter-kit/archive/$KIT_VERS.tar.gz && \
mkdir -p /app && \
tar --strip-components=1 -xzf $KIT_VERS.tar.gz -C /app && \
rm -f $KIT_VERS.tar.gz && \
cd /app && \
npm install --$NODE_ENV
# Install watchman from source
RUN \
apt-get update && apt-get install -y python-dev && \
mkdir -p /tmp/watchman && \
wget https://github.com/facebook/watchman/archive/$WATCHMAN_VERS.tar.gz && \
tar --strip-components=1 -xzf $WATCHMAN_VERS.tar.gz -C /tmp/watchman && \
cd /tmp/watchman && \
./autogen.sh && ./configure && make && make install && \
rm -f $WATCHMAN_VERS.tar.gz && rm -rf /tmp/watchman
# Mount to local file system
VOLUME /app/src
# Set current working directory
WORKDIR /app
# Run it
CMD ["npm", "start"]
# Expose ports
EXPOSE 8080
EXPOSE 8081
EXPOSE 8082