Compare commits

..

No commits in common. "41302b9f9fd95a396e5ff7d428c398198644d0d4" and "9ff168317e4fe8614ca0e0cf73fb079cec4fa78e" have entirely different histories.

3 changed files with 10 additions and 20 deletions

View File

@ -1,29 +1,19 @@
# ---- Base ---- FROM node:16-alpine
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
RUN npm install --only=production COPY package*.json ./
RUN npm install
# remove development dependencies
RUN npm prune --production
# ---- Release ---- # Install required apk-packages & delete cache
FROM base AS release RUN apk update && apk add tcpdump && rm -rf /var/cache/apk/*
# 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"]

View File

@ -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 Executable file → Normal file
View 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 \