-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
7708533
commit 4ba3d37
Showing
3 changed files
with
92 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM alpine:latest as load | ||
|
||
ARG VERSION | ||
ENV VERSION ${VERSION} | ||
RUN mkdir cala-home && mkdir cala && cd cala \ | ||
&& wget https://github.com/GaloyMoney/cala/releases/download/${VERSION}/cala-x86_64-unknown-linux-musl-${VERSION}.tar.gz -O cala.tar.gz \ | ||
&& tar --strip-components=1 -xf cala.tar.gz \ | ||
&& mv cala-server /usr/local/bin && cd ../ && rm -rf ./cala | ||
|
||
FROM gcr.io/distroless/static | ||
COPY --from=load /usr/local/bin/cala-server /bin/cala-server | ||
COPY --from=load --chown=1000:0 --chmod=755 /cala-home /cala | ||
USER 1000 | ||
ARG VERSION | ||
ARG BUILDTIME | ||
ARG COMMITHASH | ||
ENV VERSION ${VERSION} | ||
ENV BUILDTIME ${BUILDTIME} | ||
ENV COMMITHASH ${COMMITHASH} | ||
ENV CALA_HOME /cala | ||
CMD ["cala-server"] |
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,8 @@ | ||
#!/bin/bash | ||
|
||
if [[ -f version/version ]]; then | ||
echo "VERSION=$(cat version/version)" >> repo/.env | ||
fi | ||
|
||
echo "COMMITHASH=$(cat repo/.git/ref)" >> repo/.env | ||
echo "BUILDTIME=$(date -u '+%F-%T')" >> repo/.env |