HUB
Sign inSign up

jeff1010322/docker-test

By jeff1010322

•Updated over 6 years ago

Image
0

348

jeff1010322/docker-test repository overview

⁠docker-test

Testing Docker Publish scripts

⁠Simple Dockerfile

If using the Makefile to make the binary and push to docker-hub can use a very simple Dockerfile like:

FROM alpine:latest
EXPOSE 8081
ADD ./bin/docker-test /opt/
ENTRYPOINT ["/opt/docker-test"]

This will not work with Dockerhub automated builds though.

⁠Dockerfile for automated docker builds

FROM golang:alpine as builder
RUN mkdir /build
ADD . /build/
WORKDIR /build
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o main .

FROM scratch
COPY --from=builder /build/main /opt/
WORKDIR /opt
CMD ["./main"]
Tag summary
Recent tags
Content type
Image
Digest
Size
33.4 MB
Last updated
over 6 years ago
docker pull jeff1010322/docker-test:latest