forked from rgcamus/dockerfile-alpine_smashing
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.multi
More file actions
44 lines (34 loc) · 1.21 KB
/
Copy pathDockerfile.multi
File metadata and controls
44 lines (34 loc) · 1.21 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
ARG docker_arch=amd64
FROM ${docker_arch}/ruby:2.6.1-alpine3.9
ARG qemu_arch="./qemu-x86_64-static"
COPY . ${qemu_arch}* /usr/bin/
LABEL maintainer "Nick <nbadger@mintel.com>"
RUN apk update && apk upgrade \
&& apk add tzdata curl curl-dev libcurl wget bash \
&& apk add ruby ruby-bundler nodejs
# Needed to make native extensions
RUN apk add ruby-dev g++ musl-dev make \
&& echo "gem: --no-document" > /etc/gemrc \
&& gem install bundler smashing json
# Create dashboard and link volumes
RUN smashing new smashing
WORKDIR /smashing
RUN cd /smashing \
&& bundle \
&& ln -s /smashing/dashboards /dashboards \
&& ln -s /smashing/jobs /jobs \
&& ln -s /smashing/assets /assets \
&& ln -s /smashing/lib /lib-smashing \
&& ln -s /smashing/public /public \
&& ln -s /smashing/widgets /widgets \
&& mkdir /smashing/config \
&& mv /smashing/config.ru /smashing/config/config.ru \
&& ln -s /smashing/config/config.ru /smashing/config.ru \
&& ln -s /smashing/config /config \
&& rm -rf /var/cache/apk/*
COPY run.sh /
VOLUME ["/dashboards", "/jobs", "/lib-smashing", "/config", "/public", "/widgets", "/assets"]
ENV PORT 3030
EXPOSE ${PORT}
WORKDIR /smashing
CMD ["/run.sh"]