-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
executable file
·77 lines (55 loc) · 1.87 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
69
70
71
72
73
74
75
76
77
#
# MetaCall Function Mesh Example by Parra Studios
# Copyright (C) 2016 - 2019 Vicente Eduardo Ferrer Garcia <vic798@gmail.com>
#
# Builder Python image
FROM python:3.5-slim-stretch AS python_builder
# Copy Python dependencies spec
COPY frontend/requirements.txt /
# Run pip installer
RUN pip install --user -r /requirements.txt
# Builder Ruby image
FROM ruby:2.3.8-slim-stretch AS ruby_builder
# Copy Ruby dependencies spec
COPY cache/Gemfile cache/Gemfile.lock /
# Run gem installer
RUN gem install bundler \
&& bundler install --gemfile=/Gemfile
# TODO: CSharp
# # Builder CSharp image
# FROM microsoft/dotnet:1.1.10-sdk-1.1.11-stretch AS csharp_builder
# # Copy CSharp dependencies spec
# COPY pdf/ /
# Builder NodeJS image
FROM node:10.15.3-stretch-slim AS nodejs_builder
# Copy NodeJS dependencies spec
COPY react/package.json react/package-lock.json /
# Run npm installer
RUN npm ci
# Copy NodeJS source
COPY react/.babelrc react/react.jsx /
# Generate NodeJS source output
RUN npm run build
# MetaCall CLI image
FROM metacall/core:cli AS testing
# Image descriptor
LABEL copyright.name="Vicente Eduardo Ferrer Garcia" \
copyright.address="vic798@gmail.com" \
maintainer.name="Vicente Eduardo Ferrer Garcia" \
maintainer.address="vic798@gmail.com" \
vendor="MetaCall Inc." \
version="0.1"
# Copy scripts
COPY . $LOADER_SCRIPT_PATH/
# Copy Python dependencies
COPY --from=python_builder /root/.local /root/.local
# Copy Ruby dependencies
COPY --from=ruby_builder /root/.gem /root/.gem
COPY --from=ruby_builder /usr/local/bundle/ /usr/local/bundle/
# TODO: CSharp
# # Copy CSharp dependencies
# COPY --from=csharp_builder /root/.nuget /root/.nuget
# Copy NodeJS dependencies
COPY --from=nodejs_builder /root/.npm /root/.npm
COPY --from=nodejs_builder /node_modules $LOADER_SCRIPT_PATH/react/node_modules
COPY --from=nodejs_builder /react.js $LOADER_SCRIPT_PATH/react/react.js