Commit 686672a 1 parent 8f2cbf3 commit 686672a Copy full SHA for 686672a
File tree 2 files changed +17
-5
lines changed
2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 17
17
# limitations under the License.
18
18
#
19
19
20
- FROM node:20-bookworm-slim
20
+ FROM node:20-bookworm-slim AS base
21
21
22
22
# Image descriptor
23
23
LABEL copyright.name="Vicente Eduardo Ferrer Garcia" \
@@ -29,15 +29,24 @@ LABEL copyright.name="Vicente Eduardo Ferrer Garcia" \
29
29
30
30
WORKDIR /metacall
31
31
32
- RUN apt-get update \
33
- && apt-get install wget ca-certificates -y --no-install-recommends \
34
- && wget -O - https://raw.githubusercontent.com/metacall/install/master/install.sh | sh
32
+ FROM base AS deps
35
33
36
34
COPY . .
37
35
38
36
RUN npm install \
39
37
&& npm run build
40
38
39
+ FROM base as faas
40
+
41
+ RUN apt-get update \
42
+ && apt-get install wget ca-certificates -y --no-install-recommends \
43
+ && wget -O - https://raw.githubusercontent.com/metacall/install/master/install.sh | sh
44
+
45
+ COPY --from=deps /metacall/node_modules node_modules
46
+ COPY --from=deps /metacall/dist dist
47
+
41
48
EXPOSE 9000
42
49
43
50
CMD ["node" , "dist/index.js" ]
51
+
52
+ # TODO: testing
Original file line number Diff line number Diff line change @@ -26,5 +26,8 @@ services:
26
26
build :
27
27
context : .
28
28
dockerfile : Dockerfile
29
+ target : faas
29
30
ports :
30
- - " 9000:9000"
31
+ - " 9000:9000"
32
+
33
+ # TODO: testing
You can’t perform that action at this time.
0 commit comments