-
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.
- Loading branch information
Showing
4 changed files
with
192 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
certs/*.pem | ||
certs/*.srl | ||
make.sh |
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,43 @@ | ||
# build stage | ||
FROM golang:1.19.3-alpine AS build-env | ||
RUN apk --no-cache add build-base git gcc | ||
|
||
RUN mkdir -p /build | ||
COPY ./ /build/ | ||
|
||
WORKDIR /build/client/ | ||
RUN go version | ||
#RUN git checkout main && go build -o steward | ||
RUN go build -o usbtcpclient | ||
RUN pwd | ||
RUN ls -l | ||
|
||
# final stage | ||
FROM alpine | ||
|
||
RUN apk update && apk add curl | ||
|
||
WORKDIR /app | ||
COPY --from=build-env /build/client/usbtcpclient /app/ | ||
|
||
# If MTLS is enabled, give the path to the CA cert | ||
ENV CA_CERT "" | ||
# The path to the certificate | ||
ENV CERT "" | ||
# 127.0.0.1:45000 | ||
ENV IP_PORT "" | ||
# If MTLS is enabled, give the path to the key | ||
ENV KEY "" | ||
# Set to 1 to enable MTLS | ||
ENV MTLS "" | ||
# The directory path for where to store the port.info file | ||
ENV PORT_INFO_FILE_DIR "" | ||
|
||
CMD ["ash","-c","/app/usbtcpclient\ | ||
-caCert=$CA_CERT\ | ||
-cert=$CERT\ | ||
-ipPort=$IP_PORT\ | ||
-key=$KEY\ | ||
-mtls=$MTLS\ | ||
-portInfoFileDir=$PORT_INFO_FILE_DIR\ | ||
"] |
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