Skip to content

Commit

Permalink
Merge pull request #23 from concourse/bionic-base-image
Browse files Browse the repository at this point in the history
Add release for bionic base image
  • Loading branch information
cirocosta authored Mar 26, 2019
2 parents effe2fd + 34efb29 commit cf0a4f2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ environment is consistent across any `docker` enabled platform. When the docker
image builds, the test are run inside the docker container, on failure they
will stop the build.

Run the tests with the following command:
Run the tests with the following commands for both `alpine` and `ubuntu` images:

```sh
docker build -t bosh-io-stemcell-resource .
docker build -t bosh-io-stemcell-resource -f dockerfiles/alpine/Dockerfile .
docker build -t bosh-io-stemcell-resource -f dockerfiles/ubuntu/Dockerfile .
```

### Contributing
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions dockerfiles/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM concourse/golang-builder as builder
COPY . /go/src/github.com/concourse/bosh-io-stemcell-resource
ENV CGO_ENABLED 0
ENV GOPATH /go/src/github.com/concourse/bosh-io-stemcell-resource/Godeps/_workspace:${GOPATH}
ENV PATH /go/src/github.com/concourse/bosh-io-stemcell-resource/Godeps/_workspace/bin:${PATH}
RUN go build -o /assets/out github.com/concourse/bosh-io-stemcell-resource/cmd/out
RUN go build -o /assets/in github.com/concourse/bosh-io-stemcell-resource/cmd/in
RUN go build -o /assets/check github.com/concourse/bosh-io-stemcell-resource/cmd/check
RUN set -e; for pkg in $(go list ./...); do \
go test -o "/tests/$(basename $pkg).test" -c $pkg; \
done

FROM ubuntu:bionic AS resource
RUN apt-get update && apt-get install -y --no-install-recommends \
tzdata \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /assets /opt/resource

FROM resource AS tests
COPY --from=builder /tests /tests
RUN set -e; for test in /tests/*.test; do \
$test; \
done

FROM resource

0 comments on commit cf0a4f2

Please sign in to comment.