Skip to content

Commit bd5f34a

Browse files
committed
Use Webpack to generate executable bundle
1 parent 4b0ff99 commit bd5f34a

File tree

7 files changed

+1083
-14
lines changed

7 files changed

+1083
-14
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
!index.js
44
!package.json
55
!package-lock.json
6+
!webpack.config.js
7+
!webpack.hjs.language.js

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
!/lib/
88
!/lib/**/*
99

10-
# Logs
11-
*.log
10+
bundle.js
1211

13-
# Sourcemap
14-
*.js.map
12+
*.js.map

Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
FROM node:9.5.0-alpine as builder
2-
3-
ENV NODE_ENV production
1+
FROM node:12.16.2-alpine3.11 as builder
42

53
WORKDIR /kubebox
64

75
COPY lib lib/
8-
COPY package.json package-lock.json index.js ./
6+
COPY package.json package-lock.json index.js webpack.config.js webpack.hjs.language.js ./
97

108
RUN npm install
11-
RUN npm install -g browserify
129
RUN npm run bundle
1310

14-
FROM alpine:3.7
11+
FROM alpine:3.11
1512

1613
ENV TERM xterm-256color
1714
ENV LANG C.UTF-8

0 commit comments

Comments
 (0)