Skip to content

Commit

Permalink
Merge pull request #82 from concourse/bionic-base-image
Browse files Browse the repository at this point in the history
switch to ubuntu:bionic base image
  • Loading branch information
cirocosta authored Mar 26, 2019
2 parents 0447360 + bd6d7eb commit 1665fbf
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,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 github-release-resource .
docker build -t github-release-resource -f dockerfiles/alpine/Dockerfile .
docker build -t github-release-resource -f dockerfiles/ubuntu/Dockerfile .
```

### Contributing
Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions dockerfiles/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM concourse/golang-builder as builder
COPY . /go/src/github.com/concourse/github-release-resource
ENV CGO_ENABLED 0
ENV GOPATH /go/src/github.com/concourse/github-release-resource/Godeps/_workspace:${GOPATH}
ENV PATH /go/src/github.com/concourse/github-release-resource/Godeps/_workspace/bin:${PATH}
RUN go build -o /assets/out github.com/concourse/github-release-resource/cmd/out
RUN go build -o /assets/in github.com/concourse/github-release-resource/cmd/in
RUN go build -o /assets/check github.com/concourse/github-release-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 1665fbf

Please sign in to comment.