forked from stacks-archive/blockstack-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 1.12 KB
/
Dockerfile
File metadata and controls
35 lines (26 loc) · 1.12 KB
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
FROM ubuntu:xenial
# Project directory
WORKDIR /src/blockstack-browser
# Update apt and install wget
RUN apt-get update && apt-get install -y wget curl apt-utils git
# Install node
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get update && apt-get install -y nodejs
# Install cors-proxy
RUN npm install -g cors-anywhere
RUN echo '#!/bin/bash' >> /usr/bin/corsproxy
RUN echo 'node /src/blockstack-browser/corsproxy/corsproxy.js 0 0 0.0.0.0' >> /usr/bin/corsproxy
RUN chmod +x /usr/bin/corsproxy
# Alias the cors-proxy
RUN ln /usr/bin/corsproxy /usr/bin/blockstack-cors-proxy
# Copy files into container
COPY . .
# Install dependencies
RUN npm install
# Build production assets
RUN /src/blockstack-browser/node_modules/.bin/gulp prod
# Setup script to run browser
RUN echo '#!/bin/bash' >> /src/blockstack-browser/blockstack-browser
RUN echo 'node /src/blockstack-browser/native/blockstackProxy.js 8888 /src/blockstack-browser/build 0.0.0.0' >> /src/blockstack-browser/blockstack-browser
RUN chmod +x /src/blockstack-browser/blockstack-browser
RUN ln /src/blockstack-browser/blockstack-browser /usr/bin/blockstack-browser