forked from kubesphere/console
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimization the image building of KubeSphere/console (kubesphere#3591)
Signed-off-by: zhoutian <[email protected]> Signed-off-by: zhoutian <[email protected]> Co-authored-by: zhoutian <[email protected]>
- Loading branch information
1 parent
8ea1fa8
commit 6d29fbf
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2022 The KubeSphere Authors. All rights reserved. | ||
# Use of this source code is governed by an Apache license | ||
# that can be found in the LICENSE file. | ||
|
||
FROM node:12-alpine3.14 | ||
|
||
RUN adduser -D -g kubesphere -u 1002 kubesphere && \ | ||
mkdir -p /opt/kubesphere/console && \ | ||
chown -R kubesphere:kubesphere /opt/kubesphere/console | ||
|
||
WORKDIR /opt/kubesphere/console | ||
COPY ./out/ /opt/kubesphere/console/ | ||
|
||
RUN mv dist/server.js server/server.js | ||
USER kubesphere | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["npm", "run", "serve"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters