forked from chef/chef
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (34 loc) · 1.84 KB
/
Dockerfile
File metadata and controls
38 lines (34 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# About this Dockerfile:
# When run without any arguments passed, this Docker file will build the latest "stable" release of Chef. The version
# of that release is specified in the VERSION arg in this file, and is automatically updated as described below.
#
# Several processes occur using this file which are kicked off by our Expeditor pipeline tooling:
#
# When a build makes it through our internal CI system and is promoted to our "unstable" channel Expeditor will
# trigger a Docker image build of that version and push it to Docker Hub.
#
# When tests of an unstable build pass within our CI system it will be promoted to the "current" channel and
# Expeditor will tag that image as "current" on Docker Hub.
#
# When a build is promoted to our "stable" channel .expeditor/update_dockerfile.sh is run to update the version
# in this file and also tag that image as "latest" on Docker Hub. Additionally major and minor tags will be
# applied so 15.0.260 would be tagged as "latest", "stable", "15" and "15.0", as well as "15.0.260".
FROM busybox
LABEL maintainer="Progress Chef <docker@chef.io>"
#TODO: Change back to stable when 19.x is GA
ARG CHANNEL=unstable
ARG VERSION=19.0.49
ARG ARCH=x86_64
ARG HAB_AUTH_TOKEN
ENV HAB_LICENSE="accept-no-persist"
ENV HAB_AUTH_TOKEN=${HAB_AUTH_TOKEN}
# Download and extract hab binary and install infra-client habitat package
RUN wget -qO /tmp/hab.tar.gz https://packages.chef.io/files/stable/habitat/latest/hab-${ARCH}-linux.tar.gz && \
mkdir /tmp/hab && \
tar -xzf /tmp/hab.tar.gz -C /tmp/hab && \
HAB_DIR=$(find /tmp/hab -type d -name "hab-*") && \
$HAB_DIR/hab pkg install --binlink --force --channel "stable" "core/hab" && \
rm -rf /tmp/* && \
hab pkg install --binlink --force --auth "${HAB_AUTH_TOKEN}" --channel "${CHANNEL}" "chef/chef-infra-client/${VERSION}" && \
rm -rf /hab/cache
VOLUME [ "/hab" ]