-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
93 lines (73 loc) · 2.77 KB
/
Dockerfile.dev
File metadata and controls
93 lines (73 loc) · 2.77 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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# In vim, if you want colors to highlight this file correctly, type: ":set syntax=dockerfile"
FROM ubuntu:latest
MAINTAINER "granatumx" granatumx@github.com
# Make terminal colorful, useful for build information, editing, etc...
ENV TERM=xterm-256color
ENV PATH="$PATH:."
ENV DEBIAN_FRONTEND noninteractive
ENV TZ America/New_York
RUN apt-get update
RUN apt-get install -y apt-utils
RUN apt-get update
RUN apt-get install -y build-essential
RUN apt-get install -y bash-completion
RUN apt-get install -y git
RUN apt-get install -y curl
# Install vim if that is the type of editor you like
RUN apt-get install -y vim
# Typescript highlighting has not been merged
RUN git clone https://github.com/leafgarland/typescript-vim.git ~/.vim/pack/typescript/start/typescript-vim
RUN echo "syntax on" > ~/.vimrc
# Install micro if that is how you like to develop, uncomment the next two lines
# RUN curl https://getmic.ro | bash
# RUN mv micro /usr/local/bin
# Install node and dependencies/useful tools
RUN apt-get install -y nodejs npm
RUN npm install -g n
RUN n stable
RUN npm install -g depcheck typescript npm-check-updates
# Install yarn (useful for builds)
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update
RUN apt-get install -y yarn
# Install SSL
RUN apt-get install -y apache2
RUN apt-get install -y software-properties-common
RUN apt-get update
RUN add-apt-repository universe
RUN add-apt-repository -r ppa:certbot/certbot
RUN apt update
RUN apt-get update
RUN apt-get install -y python3-certbot-apache
# Used for documentation purposes
# RUN apt install -y python3 python3-pip
# WORKDIR /tmp
# RUN git clone https://github.com/hplgit/doconce.git
# RUN cd doconce && pip3 install .
# RUN cd .. && rm -rf doconce
# Copy source over so that we can proceed with build inside of docker
WORKDIR /usr/src/gx
# Build software inside of docker image
COPY [^D]*.* ./
COPY .* ./
COPY public public
COPY src src
COPY tools tools
COPY typings typings
RUN yarn install
RUN yarn build
# RUN openssl req -x509 -newkey rsa:2048 -keyout keytmp.pem -out cert.pem -days 365 -passout pass:testit
# RUN openssl rsa -in keytmp.pem -out key.pem
# Ensures Dockerfiles are copied over, but allows updates to Dockerfile(s) without rebuilding packages
# See "COPY [^D]*.* ./" above which copies everything except dockerfiles.
# To speed up iteration, install each package separately so it is cached once building.
# Also build the packages that break most often nearer to the end.
COPY . .
COPY .bashrc /root/.bashrc
ARG PORT=34567
ENV PORT=$PORT
ARG DATABASE_URL=postgres://postgres:12qw@192.168.4.101:5432/granatum
ENV DATABASE_URL=$DATABASE_URL
SHELL [ "/bin/bash", "-i", "-l", "-c" ]
EXPOSE 80 8080 34567