Skip to content

Commit

Permalink
[devshell] Upgrade to xenial & add Rust musl target support.
Browse files Browse the repository at this point in the history
Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
  • Loading branch information
fnichol committed May 17, 2016
1 parent e7ffc6a commit e196df4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ log
plans
support
!support/init.sh
tmp
vendor
www
*.md
Expand Down
24 changes: 16 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:wily
FROM ubuntu:xenial
MAINTAINER The Habitat Maintainers <humans@habitat.sh>

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -14,29 +14,37 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
libczmq-dev \
man \
musl-tools \
npm \
pkg-config \
protobuf-compiler \
sudo \
tmux \
vim \
wget \
&& rm -rf /var/lib/apt/lists/*
wget

ENV CARGO_HOME /cargo-cache
ENV PATH $PATH:$CARGO_HOME/bin:/root/.cargo/bin

ARG HAB_DEPOT_URL
ENV HAB_DEPOT_URL ${HAB_DEPOT_URL:-}

RUN curl -s https://static.rust-lang.org/rustup.sh | sh -s -- -y && rustc -V
RUN curl -sSL https://get.docker.io | sh && docker -v
RUN curl -s https://static.rust-lang.org/rustup.sh | sh -s -- -y \
&& RUST_VERSION=$(rustc -V | cut -d ' ' -f 2) \
&& URL=http://static.rust-lang.org/dist/rust-std-${RUST_VERSION}-x86_64-unknown-linux-musl.tar.gz \
&& mkdir -p /prep/rust-std-musl \
&& (cd /prep && curl -LO $URL) \
&& tar xf /prep/$(basename $URL) -C /prep/rust-std-musl --strip-components=1 \
&& (cd /prep/rust-std-musl && ./install.sh --prefix=$(rustc --print sysroot)) \
&& rm -rf /prep \
&& rustc -V
RUN env -u CARGO_HOME cargo install protobuf && rm -rf /root/.cargo/registry

RUN curl -sSL https://get.docker.io | sh && rm -rf /var/lib/apt/lists/* && docker -v
RUN ln -snf /usr/bin/nodejs /usr/bin/node && npm install -g docco && echo "docco `docco -V`"

RUN (adduser --system hab || true) && (addgroup --system hab || true)

RUN env -u CARGO_HOME cargo install protobuf && rm -rf /root/.cargo/registry

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
Expand All @@ -45,7 +53,7 @@ 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/*
&& rm -rf /tmp/install.sh /hab/cache/artifacts

WORKDIR /src
# This entrypoint is temporary until origin key download on install is implemented
Expand Down

0 comments on commit e196df4

Please sign in to comment.