Skip to content

Commit

Permalink
feat: edit ccapi to be just an extension
Browse files Browse the repository at this point in the history
Signed-off-by: osamamagdy <[email protected]>
  • Loading branch information
osamamagdy committed Jan 17, 2025
1 parent 189cdac commit 41b2505
Show file tree
Hide file tree
Showing 38 changed files with 65 additions and 2,478 deletions.
37 changes: 20 additions & 17 deletions samples/application/ccapi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,32 @@ COPY . .
# Build the Go ccapi
RUN go build -o ccapi

# Use an official Alpine runtime as a parent image
FROM alpine:latest
# # Use an official Alpine runtime as a parent image
# FROM alpine:latest

ENV PATH="${PATH}:/usr/bin/"
# ENV PATH="${PATH}:/usr/bin/"

RUN apk update
# RUN apk update

RUN apk add \
docker \
openrc \
git \
gcc \
gcompat \
libc-dev \
libc6-compat \
libstdc++ && \
ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
# RUN apk add \
# docker \
# openrc \
# git \
# gcc \
# gcompat \
# libc-dev \
# libc6-compat \
# libstdc++ && \
# ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2

# Set the working directory to /rest-server
WORKDIR /rest-server
# # Set the working directory to /rest-server
# WORKDIR /rest-server

# Copy the ccapi binary from the build container to the current directory in the Alpine container
COPY --from=build /rest-server/ccapi /usr/bin/ccapi
RUN ls -l
RUN pwd

RUN cp ./ccapi /usr/bin/ccapi

# Run the ccapi binary
CMD ["ccapi"]
145 changes: 0 additions & 145 deletions samples/application/ccapi/chaincode/event.go

This file was deleted.

97 changes: 0 additions & 97 deletions samples/application/ccapi/chaincode/eventHandler.go

This file was deleted.

37 changes: 0 additions & 37 deletions samples/application/ccapi/chaincode/invoke.go

This file was deleted.

2 changes: 1 addition & 1 deletion samples/application/ccapi/chaincode/invokeFPC.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package chaincode
import (
"net/http"

"github.com/hyperledger-labs/ccapi/common"
"github.com/hyperledger/fabric-private-chaincode/samples/application/ccapi/common"
)

func InvokeFpc(channelName string, chaincodeName string, txname string, args [][]byte) ([]byte, int, error) {
Expand Down
2 changes: 1 addition & 1 deletion samples/application/ccapi/chaincode/invokeFPCDefault.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package chaincode
import (
"net/http"

"github.com/hyperledger-labs/ccapi/common"
"github.com/hyperledger/fabric-private-chaincode/samples/application/ccapi/common"
)

func InvokeFpcDefault(txname string, args [][]byte) ([]byte, int, error) {
Expand Down
Loading

0 comments on commit 41b2505

Please sign in to comment.