mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-28 13:48:49 +08:00
MF-846 - Install python in docker build for aedes mqtt image (#860)
* Multi-stage docker build for aedes mqtt image Signed-off-by: Ivan Milošević <iva@blokovi.com> * Add copyright header Signed-off-by: Ivan Milošević <iva@blokovi.com>
This commit is contained in:
parent
5ef6aa84de
commit
a6cf76709d
@ -1,9 +1,18 @@
|
||||
# Copyright (c) Mainflux
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM node:10.15.1-alpine as builder
|
||||
|
||||
## Install build toolchain, install node deps and compile native add-ons
|
||||
RUN apk add --no-cache python make g++
|
||||
COPY mqtt/aedes/package.json .
|
||||
RUN npm rebuild && npm install --only=production
|
||||
|
||||
FROM node:10.15.1-alpine
|
||||
|
||||
## Copy built node modules and binaries without including the toolchain
|
||||
COPY --from=builder node_modules .
|
||||
COPY *.proto mqtt/* ./
|
||||
|
||||
RUN npm rebuild && npm install
|
||||
|
||||
EXPOSE 1883 8880
|
||||
|
||||
CMD ["node", "mqtt.js"]
|
||||
CMD ["node", "mqtt.js"]
|
Loading…
x
Reference in New Issue
Block a user