Skip to content

Instantly share code, notes, and snippets.

@HokieGeek
Created July 21, 2019 03:07
Show Gist options
  • Save HokieGeek/0db5d5159cc346360ffe36e499f8bf84 to your computer and use it in GitHub Desktop.
Save HokieGeek/0db5d5159cc346360ffe36e499f8bf84 to your computer and use it in GitHub Desktop.
ahab tests
### Build the code
FROM golang:1.12
ENV GO111MODULE=on GOOS=linux GOARCH=amd64
RUN apt-get update
WORKDIR /go/src/github.com/sonatype/ahab
COPY . .
RUN go install -v -ldflags="-w -s" ./...
### Package it up
FROM ubuntu:latest
RUN apt-get update && apt-get --assume-yes install python-pip
COPY --from=0 /go/bin/ahab /usr/local/bin
RUN apt list --installed | ahab chase
### Build the code
FROM golang:1.12
ENV GO111MODULE=on GOOS=linux GOARCH=amd64
RUN apt-get update
WORKDIR /go/src/github.com/sonatype/ahab
COPY . .
RUN go install -v -ldflags="-w -s" ./...
### Package it up
FROM centos:latest
RUN yum -y update && yum -y install epel-release && yum -y install python-pip openssl
COPY --from=0 /go/bin/ahab /usr/local/bin
RUN yum --quiet list installed | ahab chase --pkg yum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment