Skip to content

Commit

Permalink
remove alpine dockerfile;base image is paketo jammy run static
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Yang <[email protected]>
  • Loading branch information
Rui Yang committed May 29, 2023
1 parent 3c73eac commit 9871981
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 35 deletions.
8 changes: 5 additions & 3 deletions dockerfiles/ubuntu/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARG base_image=ubuntu:latest
ARG builder_image=concourse/golang-builder

FROM busybox:uclibc as busybox

FROM ${builder_image} AS builder
WORKDIR /concourse/time-resource
COPY go.mod .
Expand All @@ -16,10 +18,10 @@ RUN set -e; for pkg in $(go list ./...); do \
done

FROM ${base_image} AS resource
RUN apt update && apt upgrade -y -o Dpkg::Options::="--force-confdef"
RUN apt update && apt install -y --no-install-recommends tzdata \
&& rm -rf /var/lib/apt/lists/*
USER root
COPY --from=builder /assets /opt/resource
COPY --from=busybox /bin/sh /bin/sh
COPY --from=busybox /bin/cp /bin/cp

FROM resource AS tests
COPY --from=builder /tests /tests
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,10 @@ 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 commands for both `alpine` and `ubuntu` images:
Run the tests with the following command:

```sh
docker build -t time-resource --target tests -f dockerfiles/alpine/Dockerfile .
docker build -t time-resource --target tests -f dockerfiles/ubuntu/Dockerfile .
docker build -t time-resource --target tests --build-arg base_image=paketobuildpacks/run-jammy-static:latest .
```

### Contributing
Expand Down
29 changes: 0 additions & 29 deletions dockerfiles/alpine/Dockerfile

This file was deleted.

0 comments on commit 9871981

Please sign in to comment.