Skip to content

Commit

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

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

Please sign in to comment.