Skip to content

Commit

Permalink
fix version
Browse files Browse the repository at this point in the history
Signed-off-by: dwertent <[email protected]>
  • Loading branch information
dwertent committed Sep 10, 2024
1 parent f6cf1b2 commit d633364
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
ARG FIREFLY_BUILDER_TAG
ARG FABRIC_BUILDER_TAG
ARG FABRIC_BUILDER_PLATFORM
ARG SOLIDITY_BUILDER_TAG
ARG BASE_TAG
# Consider adding default values for the ARGs based on this warning:
# https://github.com/hyperledger/firefly/actions/runs/10795366695/job/29941873807#step:4:171

# ARG FIREFLY_BUILDER_TAG=default_firefly_builder_tag
# ARG FABRIC_BUILDER_TAG=default_fabric_builder_tag
# ARG FABRIC_BUILDER_PLATFORM=linux/amd64
# ARG SOLIDITY_BUILDER_TAG=default_solidity_builder_tag
# ARG BASE_TAG=default_base_tag

ARG BUILD_VERSION
ARG GIT_REF

Expand All @@ -12,7 +16,7 @@ ARG GIT_REF
RUN apk add make=4.4.1-r2 \
gcc=13.2.1_git20231014-r0 \
build-base=0.5-r3 \
curl=8.9.1 \
curl=8.9.1-r0 \
git=2.43.4-r0
WORKDIR /firefly
RUN chgrp -R 0 /firefly \
Expand All @@ -39,13 +43,12 @@ RUN GO111MODULE=on go mod vendor
WORKDIR /tmp/fabric
RUN curl https://github.com/hyperledger/fabric/releases/download/v2.3.2/hyperledger-fabric-linux-amd64-2.3.2.tar.gz -L --output hyperledger-fabric-linux-amd64-2.3.2.tar.gz
RUN tar -zxf hyperledger-fabric-linux-amd64-2.3.2.tar.gz
ENV FABRIC_CFG_PATH /tmp/fabric/config/
ENV FABRIC_CFG_PATH=/tmp/fabric/config/
RUN ./bin/peer lifecycle chaincode package /firefly/smart_contracts/fabric/firefly-go/firefly_fabric.tar.gz --path /firefly/smart_contracts/fabric/firefly-go --lang golang --label firefly_1.0

FROM $SOLIDITY_BUILDER_TAG AS solidity-builder
WORKDIR /firefly/solidity_firefly
RUN chgrp -R 0 /firefly \
&& chmod -R g+rwX /firefly
RUN chgrp -R 0 /firefly && chmod -R g+rwX /firefly
ADD --chown=1001:0 smart_contracts/ethereum/solidity_firefly/ .
USER 1001
RUN mkdir -p build/contracts \
Expand All @@ -54,7 +57,7 @@ RUN mkdir -p build/contracts \
&& cd ../build/contracts \
&& mv combined.json Firefly.json

FROM alpine:3.19 AS SBOM
FROM alpine:3.19 AS sbom
WORKDIR /
ADD . /SBOM
RUN apk add --no-cache curl
Expand All @@ -68,7 +71,7 @@ ARG UI_RELEASE
RUN apk add --update --no-cache \
sqlite=3.44.2-r0 \
postgresql16-client=16.3-r0 \
curl=8.9.1 \
curl=8.9.1-r0 \
jq=1.7.1-r0
WORKDIR /firefly
RUN chgrp -R 0 /firefly \
Expand All @@ -83,10 +86,10 @@ COPY --from=firefly-builder --chown=1001:0 /firefly/firefly ./firefly
COPY --from=firefly-builder --chown=1001:0 /firefly/db ./db
COPY --from=solidity-builder --chown=1001:0 /firefly/solidity_firefly/build/contracts ./contracts
COPY --from=fabric-builder --chown=1001:0 /firefly/smart_contracts/fabric/firefly-go/firefly_fabric.tar.gz ./contracts/firefly_fabric.tar.gz
ENV UI_RELEASE https://github.com/hyperledger/firefly-ui/releases/download/$UI_TAG/$UI_RELEASE.tgz
ENV UI_RELEASE=https://github.com/hyperledger/firefly-ui/releases/download/$UI_TAG/$UI_RELEASE.tgz
RUN mkdir /firefly/frontend \
&& curl -sLo - $UI_RELEASE | tar -C /firefly/frontend -zxvf -
COPY --from=SBOM /sbom.spdx.json /sbom.spdx.json
COPY --from=sbom /sbom.spdx.json /sbom.spdx.json
RUN ln -s /firefly/firefly /usr/bin/firefly
USER 1001
ENTRYPOINT [ "firefly" ]

0 comments on commit d633364

Please sign in to comment.