Skip to content

Commit

Permalink
Install core origin public key in devshell.
Browse files Browse the repository at this point in the history
This is a temporary measure until public origin keys are downloaded on
package installations. Its implementation is non-straight forward
because we're caching the `/hab/cache/keys` directory with a mounted
data volume. When the Docker container comes up, this directory is bind
mounted over and the underlying directory contents is masked out.

Pull request: #457
Approved by: reset
  • Loading branch information
fnichol authored and jtimberman committed Jun 12, 2016
1 parent 1f20e68 commit 0836787
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ images
log
plans
support
!support/init.sh
vendor
web
*.md
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ RUN cargo install protobuf
COPY .delivery/scripts/ssh_wrapper.sh /usr/local/bin
COPY .delivery/scripts/git_src_checkout.sh /usr/local/bin
COPY components/studio/install.sh /tmp
COPY support/init.sh /init.sh
RUN /tmp/install.sh \
&& hab-bpm install core/busybox-static \
&& (cd /tmp && curl -sLO https://s3-us-west-2.amazonaws.com/fnichol-lfs-tools/core-20160423193745.pub) \
&& chmod 755 /init.sh \
&& rm -f /tmp/install.sh /hab/cache/artifacts/*

WORKDIR /src
# This entrypoint is temporary until origin key download on install is implemented
ENTRYPOINT ["/init.sh"]
CMD ["bash"]
8 changes: 8 additions & 0 deletions support/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -e

if [ ! -f /hab/cache/keys/core-20160423193745.pub ]; then
cp -v /tmp/core-20160423193745.pub /hab/cache/keys
fi

exec "$@"

0 comments on commit 0836787

Please sign in to comment.