mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
149950d5e7
Signed-off-by: Jess Frazelle <acidburn@github.com>
54 lines
1.3 KiB
Docker
54 lines
1.3 KiB
Docker
FROM golang:1.10 as builder
|
|
MAINTAINER Jessica Frazelle <jess@linux.com>
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
ENV GOPATH /go
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
apt-transport-https \
|
|
ca-certificates \
|
|
curl \
|
|
--no-install-recommends \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
gcc \
|
|
git \
|
|
g++ \
|
|
make \
|
|
nodejs \
|
|
pkgconf \
|
|
python \
|
|
yarn \
|
|
zip \
|
|
--no-install-recommends \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV NOMAD_VERSION v0.9.0-beta3
|
|
|
|
RUN go get github.com/hashicorp/nomad
|
|
|
|
WORKDIR /go/src/github.com/hashicorp/nomad
|
|
|
|
RUN git checkout "${NOMAD_VERSION}"
|
|
|
|
RUN set -x \
|
|
&& make bootstrap ember-dist static-assets \
|
|
&& CGO_ENABLED=1 GOOS=linux GOARCH=amd64 \
|
|
go build \
|
|
-ldflags "-X github.com/hashicorp/nomad/version.GitCommit=$(git rev-parse HEAD) -extldflags -static " \
|
|
-tags "ui release" \
|
|
-o /usr/bin/nomad
|
|
|
|
FROM alpine:latest
|
|
|
|
COPY --from=builder /usr/bin/nomad /usr/bin/nomad
|
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
|
|
|
ENTRYPOINT [ "nomad" ]
|
|
CMD [ "--help" ]
|