Skip to content

Commit

Permalink
Update virtual docker build sample (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou authored Aug 19, 2024
1 parent 3b26d11 commit 4c84466
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docker/ccf_app_cpp.enclave
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ COPY --from=builder /opt/ccf_sgx/bin/*.js /app/
COPY --from=builder /opt/ccf_sgx/bin/keygenerator.sh /app/
COPY ./config/cchost_config_enclave_cpp.json /app/
WORKDIR /app/
# IMPORTANT: This creates a member key pair and stores it in the container,
# which is only acceptable for test purposes. A real deployment must instead
# create and store keys somewhere secure, and only load the public key in the
# container, preferably through a mount.
RUN /app/keygenerator.sh --name member0 --gen-enc-key

EXPOSE 8080/tcp
Expand Down
4 changes: 4 additions & 0 deletions docker/ccf_app_cpp.virtual
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ COPY --from=builder /opt/ccf_virtual/bin/*.js /app/
COPY --from=builder /opt/ccf_virtual/bin/keygenerator.sh /app/
COPY ./config/cchost_config_virtual_cpp.json /app/
WORKDIR /app/
# IMPORTANT: This creates a member key pair and stores it in the container,
# which is only acceptable for test purposes. A real deployment must instead
# create and store keys somewhere secure, and only load the public key in the
# container, preferably through a mount.
RUN /app/keygenerator.sh --name member0 --gen-enc-key

EXPOSE 8080/tcp
Expand Down
4 changes: 4 additions & 0 deletions docker/ccf_app_js.enclave
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ COPY --from=builder /opt/ccf_sgx/bin/*.js /app/
COPY --from=builder /opt/ccf_sgx/bin/keygenerator.sh /app/
COPY ./config/cchost_config_enclave_js.json /app/
WORKDIR /app/
# IMPORTANT: This creates a member key pair and stores it in the container,
# which is only acceptable for test purposes. A real deployment must instead
# create and store keys somewhere secure, and only load the public key in the
# container, preferably through a mount.
RUN /app/keygenerator.sh --name member0 --gen-enc-key

EXPOSE 8080/tcp
Expand Down
8 changes: 4 additions & 4 deletions docker/ccf_app_js.virtual
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ FROM ghcr.io/microsoft/ccf/app/dev/virtual:ccf-5.0.0 as builder
# Run
FROM ghcr.io/microsoft/ccf/app/run-js/virtual:ccf-5.0.0

# Note: libjs_generic.virtual is not included in run-js container
COPY --from=builder /opt/ccf_virtual/lib/libjs_generic.virtual.so /usr/lib/ccf
RUN true # https://github.com/moby/moby/issues/37965
COPY --from=builder /opt/ccf_virtual/bin/*.js /app/
RUN true # https://github.com/moby/moby/issues/37965
COPY --from=builder /opt/ccf_virtual/bin/keygenerator.sh /app/
COPY ./config/cchost_config_virtual_js.json /app/
WORKDIR /app/
# IMPORTANT: This creates a member key pair and stores it in the container,
# which is only acceptable for test purposes. A real deployment must instead
# create and store keys somewhere secure, and only load the public key in the
# container, preferably through a mount.
RUN /app/keygenerator.sh --name member0 --gen-enc-key

EXPOSE 8080/tcp
Expand Down

0 comments on commit 4c84466

Please sign in to comment.