mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-25 11:05:10 +00:00
ERC721 java chaincode implementation.
Signed-off-by: renjithkn@gmail.com <renjithkn@gmail.com>
This commit is contained in:
parent
a068270b6c
commit
a318fea8be
1 changed files with 30 additions and 31 deletions
|
|
@ -1,31 +1,30 @@
|
||||||
# the first stage
|
# the first stage
|
||||||
FROM gradle:jdk11 AS GRADLE_BUILD
|
FROM gradle:jdk11 AS GRADLE_BUILD
|
||||||
|
|
||||||
# copy the build.gradle and src code to the container
|
# copy the build.gradle and src code to the container
|
||||||
COPY src/ src/
|
COPY src/ src/
|
||||||
COPY build.gradle ./
|
COPY build.gradle ./
|
||||||
|
|
||||||
# Build and package our code
|
# Build and package our code
|
||||||
RUN gradle --no-daemon build shadowJar -x checkstyleMain -x checkstyleTest
|
RUN gradle --no-daemon build shadowJar -x checkstyleMain -x checkstyleTest
|
||||||
|
|
||||||
|
# the second stage of our build just needs the compiled files
|
||||||
# the second stage of our build just needs the compiled files
|
FROM openjdk:11-jre
|
||||||
FROM openjdk:11-jre
|
ARG CC_SERVER_PORT=9999
|
||||||
ARG CC_SERVER_PORT=9999
|
|
||||||
|
# Setup tini to work better handle signals
|
||||||
# Setup tini to work better handle signals
|
ENV TINI_VERSION v0.19.0
|
||||||
ENV TINI_VERSION v0.19.0
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
RUN chmod +x /tini
|
||||||
RUN chmod +x /tini
|
|
||||||
|
RUN addgroup --system javauser && useradd -g javauser javauser
|
||||||
RUN addgroup --system javauser && useradd -g javauser javauser
|
|
||||||
|
# copy only the artifacts we need from the first stage and discard the rest
|
||||||
# copy only the artifacts we need from the first stage and discard the rest
|
COPY --chown=javauser:javauser --from=GRADLE_BUILD /home/gradle/build/libs/chaincode.jar /chaincode.jar
|
||||||
COPY --chown=javauser:javauser --from=GRADLE_BUILD /home/gradle/build/libs/chaincode.jar /chaincode.jar
|
COPY --chown=javauser:javauser docker/docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
COPY --chown=javauser:javauser docker/docker-entrypoint.sh /docker-entrypoint.sh
|
RUN chmod +x /docker-entrypoint.sh
|
||||||
RUN chmod +x /docker-entrypoint.sh
|
ENV PORT $CC_SERVER_PORT
|
||||||
ENV PORT $CC_SERVER_PORT
|
EXPOSE $CC_SERVER_PORT
|
||||||
EXPOSE $CC_SERVER_PORT
|
|
||||||
|
USER javauser
|
||||||
USER javauser
|
ENTRYPOINT [ "/tini", "--", "/docker-entrypoint.sh" ]
|
||||||
ENTRYPOINT [ "/tini", "--", "/docker-entrypoint.sh" ]
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue