diff --git a/.dockerignore b/.dockerignore index e7e7a581fb3..7dfced38689 100644 --- a/.dockerignore +++ b/.dockerignore @@ -10,6 +10,7 @@ log plans support !support/init.sh +tmp vendor www *.md diff --git a/Dockerfile b/Dockerfile index a21af2d6e37..8c445683af5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:wily +FROM ubuntu:xenial MAINTAINER The Habitat Maintainers RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -14,14 +14,14 @@ 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 @@ -29,14 +29,22 @@ 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 @@ -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