Compare commits
4 Commits
9ff168317e
...
41302b9f9f
Author | SHA1 | Date | |
---|---|---|---|
41302b9f9f | |||
ad8d546b78 | |||
d5a727c3df | |||
d5c7f0a580 |
26
Dockerfile
26
Dockerfile
@ -1,19 +1,29 @@
|
|||||||
FROM node:16-alpine
|
# ---- Base ----
|
||||||
|
FROM alpine:3 AS base
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# Copy project file
|
||||||
|
COPY package.json .
|
||||||
|
|
||||||
|
# Install required apk-packages
|
||||||
|
RUN apk add --no-cache nodejs npm tcpdump
|
||||||
|
|
||||||
|
|
||||||
|
# ---- Dependencies ----
|
||||||
|
FROM base AS dependencies
|
||||||
|
|
||||||
# Install app dependencies
|
# Install app dependencies
|
||||||
COPY package*.json ./
|
RUN npm install --only=production
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
# remove development dependencies
|
|
||||||
RUN npm prune --production
|
|
||||||
|
|
||||||
# Install required apk-packages & delete cache
|
# ---- Release ----
|
||||||
RUN apk update && apk add tcpdump && rm -rf /var/cache/apk/*
|
FROM base AS release
|
||||||
|
|
||||||
|
# copy from build image
|
||||||
|
COPY --from=dependencies /usr/src/app/ ./
|
||||||
# Bundle app source
|
# Bundle app source
|
||||||
COPY ./src/ .
|
COPY ./src/ .
|
||||||
|
|
||||||
CMD ["npm", "run", "start"]
|
CMD ["npm", "run", "start"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
TAG="ruakij/rfmon-to-influx"
|
TAG="ruakij/rfmon-to-influx"
|
||||||
PLATFORM="linux/amd64,linux/arm64/v8,linux/arm/v7"
|
PLATFORM="linux/amd64,linux/arm64/v8,linux/arm/v7"
|
||||||
EXTRA_ARGS=""
|
EXTRA_ARGS="$@"
|
||||||
|
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform $PLATFORM \
|
--platform $PLATFORM \
|
||||||
|
2
build/docker-ownarch.sh
Normal file → Executable file
2
build/docker-ownarch.sh
Normal file → Executable file
@ -1,5 +1,5 @@
|
|||||||
TAG="ruakij/rfmon-to-influx"
|
TAG="ruakij/rfmon-to-influx"
|
||||||
EXTRA_ARGS=""
|
EXTRA_ARGS="$@"
|
||||||
|
|
||||||
docker build \
|
docker build \
|
||||||
--tag $TAG \
|
--tag $TAG \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user