-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: cmd execute exit code formate improve and add make node-agent ta…
…rget Signed-off-by: wangdepeng <[email protected]> (cherry picked from commit 5853e67)
- Loading branch information
1 parent
5eb2ed8
commit c1737b3
Showing
27 changed files
with
78 additions
and
191 deletions.
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
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,21 @@ | ||
FROM ubuntu:latest as release-env | ||
|
||
ARG BINARY | ||
|
||
WORKDIR /app | ||
# copy install file to container | ||
# build context is _output/xx/xx | ||
COPY agent/* . | ||
|
||
# install rsync | ||
RUN apt-get update && apt-get install -y rsync pwgen openssl && \ | ||
openssl req -x509 -sha256 -new -nodes -days 3650 -newkey rsa:2048 -keyout key.pem -out cert.pem -subj "/C=CN/O=Kosmos/OU=Kosmos/CN=kosmos.io" && \ | ||
WEB_USER=agent && \ | ||
WEB_PASS=$(pwgen -y 12 1) && \ | ||
sed -i "s/{{WEB_USER}}/$WEB_USER/g" agent.env && \ | ||
sed -i "s/{{WEB_PASS}}/$WEB_PASS/g" agent.env | ||
|
||
COPY ${BINARY} /app | ||
|
||
# install command | ||
CMD ["bash", "/app/install.sh", "/app"] |
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,21 @@ | ||
FROM ubuntu:latest as release-env | ||
|
||
ARG BINARY | ||
ARG TARGETPLATFORM | ||
|
||
WORKDIR /app | ||
# copy install file to container | ||
COPY ${TARGETPLATFORM}/agent/* . | ||
|
||
# install rsync | ||
RUN apt-get update && apt-get install -y rsync pwgen openssl && \ | ||
openssl req -x509 -sha256 -new -nodes -days 3650 -newkey rsa:2048 -keyout key.pem -out cert.pem -subj "/C=CN/O=Kosmos/OU=Kosmos/CN=kosmos.io" && \ | ||
WEB_USER=agent && \ | ||
WEB_PASS=$(pwgen -y 12 1) && \ | ||
sed -i "s/{{WEB_USER}}/$WEB_USER/g" agent.env && \ | ||
sed -i "s/{{WEB_PASS}}/$WEB_PASS/g" agent.env | ||
|
||
COPY ${TARGETPLATFORM}/${BINARY} /app | ||
|
||
# install command | ||
CMD ["bash", "/app/install.sh", "/app"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
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,2 @@ | ||
WEB_USER={{WEB_USER}} | ||
WEB_PASS={{WEB_PASS}} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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