This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass private keys in txt format (#37)
- Loading branch information
1 parent
cc7ab3d
commit b6cfef8
Showing
3 changed files
with
63 additions
and
6 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
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,40 @@ | ||
FROM --platform=linux/amd64 golang:1.21-bookworm AS builder | ||
|
||
WORKDIR /src | ||
ADD . /src | ||
|
||
ARG GH_TOKEN | ||
|
||
RUN git config --global url."https://${GH_TOKEN}@github.com".insteadOf "https://github.com" | ||
ENV GOPRIVATE="github.com/upshot-tech/" | ||
|
||
RUN go mod download && \ | ||
make all | ||
|
||
########################### | ||
FROM --platform=linux/amd64 debian:bookworm-slim | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
USERNAME=appuser \ | ||
APP_PATH=/data | ||
|
||
## curl, unzip other utilities | ||
RUN apt update && \ | ||
apt -y dist-upgrade && \ | ||
apt install -y --no-install-recommends \ | ||
tzdata \ | ||
ca-certificates && \ | ||
rm -rf /var/cache/apt/* | ||
|
||
COPY --from=builder /src/dist/upshot-node /usr/local/bin/upshot-node | ||
COPY --from=builder /src/dist/upshot-keys /usr/local/bin/upshot-keys | ||
|
||
RUN groupadd -g 1001 ${USERNAME} \ | ||
&& useradd -m -d ${APP_PATH} -u 1001 -g 1001 ${USERNAME} | ||
|
||
USER ${USERNAME} | ||
|
||
VOLUME ${APP_PATH} | ||
EXPOSE 8080 9527 | ||
|
||
ENTRYPOINT ["upshot-node"] |