Skip to content

Commit c2a14f4

Browse files
committed
Introduce Docker Image For SCB-SDK
To enable us to use the scb-sdk in both parser- and hook-sdk whithout publishing the scb-sdk to npm. Signed-off-by: Yannik Fuhrmeister <yannik.fuhrmeister@iteratec.com>
1 parent 175cea9 commit c2a14f4

3 files changed

Lines changed: 27 additions & 4 deletions

File tree

‎hook-sdk/nodejs/Dockerfile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ WORKDIR /home/app
33
COPY package.json package-lock.json ./
44
RUN npm ci --production
55

6-
FROM node:12-alpine
6+
FROM securecodebox/scb-sdk:${baseImageTag:-latest}
77
ARG NODE_ENV
8-
RUN addgroup --system --gid 1001 app && adduser app --system --uid 1001 --ingroup app
98
WORKDIR /home/app/hook-wrapper/
109
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
1110
COPY --chown=app:app ./hook-wrapper.js ./hook-wrapper.js

‎parser-sdk/nodejs/Dockerfile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ WORKDIR /home/app
33
COPY package.json package-lock.json ./
44
RUN npm ci --production
55

6-
FROM node:12-alpine
6+
FROM securecodebox/scb-sdk:${baseImageTag:-latest}
77
ARG NODE_ENV
8-
RUN addgroup --system --gid 1001 app && adduser app --system --uid 1001 --ingroup app
98
WORKDIR /home/app/parser-wrapper/
109
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
1110
COPY --chown=app:app ./parser-wrapper.js ./parser-wrapper.js

‎scb-sdk/nodejs/Dockerfile‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2020 iteratec GmbH
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM node:12-alpine as build
16+
WORKDIR /home/app
17+
COPY package.json package-lock.json ./
18+
RUN npm ci --production
19+
20+
FROM node:12-alpine
21+
ARG NODE_ENV
22+
RUN addgroup --system --gid 1001 app && adduser app --system --uid 1001 --ingroup app
23+
WORKDIR /home/app/scb-sdk/
24+
COPY --from=build --chown=app:app /home/app/node_modules/ ./node_modules/
25+
COPY --chown=app:app ./scb-sdk.js ./scb-sdk.js

0 commit comments

Comments
 (0)