Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve(feat): Imagebuild and Imagesize #876

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
FROM node:21.4.0-alpine3.17
FROM node:21.4.0 AS builder

AndreasHeine marked this conversation as resolved.
Show resolved Hide resolved
WORKDIR /home/node/opcua-server
RUN node -v

# hadolint ignore=DL3018
RUN apk --no-cache add \
openssl=3.0.15-r0 \
python3=3.10.15-r0 \
make=4.3-r1 \
g++=12.2.1_git20220924-r4 \
gcc=12.2.1_git20220924-r4
WORKDIR /home/node

COPY . /home/node/opcua-server
COPY . /home/node

RUN chown -R node:node /home/node

USER node

RUN npm -v
RUN npm install

EXPOSE 4840
RUN npm run pretest

RUN chown -R node:node /home/node/opcua-server
FROM node:21.4.0-alpine3.17 AS production

AndreasHeine marked this conversation as resolved.
Show resolved Hide resolved
USER node

ENTRYPOINT ["npm", "run", "start"]
WORKDIR /home/node

COPY --from=builder /home/node/dst/ ./dst/
COPY --from=builder /home/node/node_modules ./node_modules

COPY ./package.json /home/node
COPY ./user.json /home/node
COPY ./configuration.json /home/node
COPY ./nodesets /home/node/nodesets
COPY ./models /home/node/models


EXPOSE 4840

ENTRYPOINT ["node", "./dst/server.js"]

Loading