Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Aug 9, 2022
1 parent 20825a4 commit 8667d98
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
file: ./linux/Dockerfile
# In case linux/s390x fails with tls issues:
# see https://github.com/testcontainers/moby-ryuk/pull/26
# and https://github.com/testcontainers/moby-ryuk/pull/40
Expand Down
11 changes: 0 additions & 11 deletions Dockerfile

This file was deleted.

38 changes: 0 additions & 38 deletions Makefile

This file was deleted.

21 changes: 21 additions & 0 deletions linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM golang:1.19 AS workspace
LABEL builder=true

ENV CGO_ENABLED=0

WORKDIR /go/src/github.com/testcontainers/moby-ryuk
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN cd /go/src/github.com/testcontainers/moby-ryuk && go get -d \
&& go vet ./... \
&& go test ./... \
&& go build \
-v -a \
-ldflags "-s -w -extldflags \"-static\"" \
-o /bin/moby-ryuk main.go

FROM alpine:3.16.1
RUN apk --no-cache add ca-certificates
COPY --from=workspace /bin/moby-ryuk /moby-ryuk
CMD ["/moby-ryuk"]
9 changes: 5 additions & 4 deletions windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ FROM golang:1.19-nanoserver AS workspace
LABEL builder=true

ENV CGO_ENABLED=0
#ENV GO111MODULE=on

WORKDIR /go/src/github.com/testcontainers/moby-ryuk
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN cd /go/src/github.com/testcontainers/moby-ryuk && go get -d \
&& go vet ./... \
&& go test ./... \
&& go build \
-v -a \
-ldflags "-s -w -extldflags \"-static\"" \
-o /bin/main main.go
-o /bin/moby-ryuk main.go

FROM mcr.microsoft.com/windows/nanoserver:ltsc2022
COPY --from=workspace /bin/main /app
CMD ["/app"]
COPY --from=workspace /bin/moby-ryuk /moby-ryuk
CMD ["/moby-ryuk"]

0 comments on commit 8667d98

Please sign in to comment.