-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (56 loc) · 2.01 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# how to build tiny production image from:
# https://blog.hasura.io/an-exhaustive-guide-to-writing-dockerfiles-for-node-js-web-apps-bbee6bd2f3c4
#
# base image (from 3.99 GB to 657 MB) yay Alpine!
#FROM node:9.4
#FROM beevelop/ionic:latest
FROM node:8.9-alpine
# Set one or more individual labels
LABEL org.sandysearch.name="SandySearch Mobile/Web App"
LABEL org.sandysearch.version="0.0.7-beta"
LABEL org.sandysearch.release-date="2018-10-18"
LABEL org.sandysearch.version.is-production=""
LABEL org.sandysearch.hackathon="Call For Code 2018"
# add git for pull
RUN apk add git -U
# add required libsecret-1-dev, needed by keytar, needed by geofire
#RUN apt-get -V install -y libsecret-1-dev
# add updates for security issues
#RUN apt-get update && apt-get -V install -y \
# --no-install-recommends \
# gnupg \
# gpgv \
# libgcrypt20 \
# openssl \
# procps \
# libtomcat8-java \
# libprocps4 \
# libssl1.0.0 \
# libsecret-1-dev \
# && rm -rf /var/lib/apt/lists/*
# Bundle app source
COPY . /app
# set working directory
WORKDIR /app
# install and cache app dependencies
#COPY package*.json /usr/src/app/
#ADD package.json /usr/src/app/package.json
RUN npm install
#RUN npm install geofire - DOES NOT WORK in Container?!
COPY ./geofire/ /app/node_modules/geofire/
# Specify port
EXPOSE 8100
# start app
# start with "docker run -it image"
#CMD ["bash"]
# start with "docker run -d -p 80:8100 --name name image"
#CMD ["ionic", "serve", "-c", "-s", "-b"]
CMD ["node_modules/.bin/ionic", "serve", "-c", "-s", "-b", "--no-livereload"]
# https://lightsonsoftware.com/developing-ionic-apps-docker-style/
# https://hub.docker.com/r/agileek/ionic-framework/
# https://github.com/agileek/docker
# https://blog.typodrive.com/2017/05/03/build-ionic-in-a-dockerfile/
# https://blog.saddey.net/2016/07/03/using-docker-to-create-ionic-2-pwa-developer-environment/
# https://jpnarowski.com/how-to-publish-an-ionic-android-app-with-docker/
# https://blog.ionicframework.com/docker-hot-code-deploys/
# https://github.com/beevelop/docker-ionic