-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adjusted thumbnail and websocket sample
- Loading branch information
Showing
7 changed files
with
44 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
FROM icr.io/codeengine/golang:alpine AS bootstrap | ||
WORKDIR /go/src/ | ||
FROM quay.io/projectquay/golang:1.22 AS build-env | ||
WORKDIR /go/src/app | ||
COPY . . | ||
RUN go build -o /eventer eventer.go | ||
|
||
RUN CGO_ENABLED=0 go build -o /go/bin/app eventer.go | ||
|
||
# Copy the exe into a smaller base image | ||
FROM icr.io/codeengine/alpine | ||
COPY --from=bootstrap /eventer /eventer | ||
CMD ["/eventer"] | ||
FROM gcr.io/distroless/static-debian12 | ||
COPY --from=build-env /go/bin/app / | ||
CMD ["/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
FROM icr.io/codeengine/golang:alpine AS bootstrap | ||
WORKDIR /go/src/ | ||
FROM quay.io/projectquay/golang:1.22 AS build-env | ||
WORKDIR /go/src/app | ||
COPY . . | ||
RUN go build -o /thumbnail app.go | ||
|
||
RUN CGO_ENABLED=0 go build -o /go/bin/app app.go | ||
|
||
# Copy the exe into a smaller base image | ||
FROM icr.io/codeengine/alpine | ||
COPY --from=bootstrap /thumbnail /thumbnail | ||
FROM gcr.io/distroless/static-debian12 | ||
COPY --from=build-env /go/bin/app / | ||
COPY page.html / | ||
COPY pictures/* /pictures/ | ||
CMD ["/thumbnail"] | ||
CMD ["/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
FROM icr.io/codeengine/golang AS bootstrap | ||
WORKDIR /go/src/ | ||
FROM quay.io/projectquay/golang:1.22 AS build-env | ||
WORKDIR /go/src/app | ||
COPY . . | ||
RUN go build -o /app app.go | ||
|
||
RUN CGO_ENABLED=0 go build -o /go/bin/app app.go | ||
|
||
# Copy the exe into a smaller base image | ||
FROM icr.io/codeengine/ubuntu | ||
COPY --from=bootstrap /app /app | ||
FROM gcr.io/distroless/static-debian12 | ||
COPY --from=build-env /go/bin/app / | ||
COPY page.html / | ||
COPY pictures/* /pictures/ | ||
CMD ["/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
FROM icr.io/codeengine/golang AS bootstrap | ||
WORKDIR /go/src/ | ||
FROM quay.io/projectquay/golang:1.22 AS build-env | ||
WORKDIR /go/src/app | ||
COPY . . | ||
RUN go build -o /job job.go | ||
|
||
RUN CGO_ENABLED=0 go build -o /go/bin/job job.go | ||
|
||
# Copy the exe into a smaller base image | ||
FROM icr.io/codeengine/ubuntu | ||
COPY --from=bootstrap /job /job | ||
FROM gcr.io/distroless/static-debian12 | ||
COPY --from=build-env /go/bin/app / | ||
CMD ["/job"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
FROM icr.io/codeengine/golang:alpine | ||
COPY client.go /src/ | ||
WORKDIR /src | ||
FROM quay.io/projectquay/golang:1.22 AS build-env | ||
WORKDIR /go/src/app | ||
COPY client.go . | ||
|
||
RUN go mod init main && go mod tidy | ||
RUN go build -o /client client.go | ||
RUN CGO_ENABLED=0 go build -o /go/bin/app client.go | ||
|
||
# Copy the exe into a smaller base image | ||
FROM icr.io/codeengine/alpine | ||
COPY --from=0 /client /client | ||
ENTRYPOINT [ "/client" ] | ||
FROM gcr.io/distroless/static-debian12 | ||
COPY --from=build-env /go/bin/app / | ||
CMD ["/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
FROM icr.io/codeengine/golang:alpine | ||
COPY server.go /src/ | ||
WORKDIR /src | ||
FROM quay.io/projectquay/golang:1.22 AS build-env | ||
WORKDIR /go/src/app | ||
COPY server.go . | ||
|
||
RUN go mod init main && go mod tidy | ||
RUN go build -o /server server.go | ||
RUN CGO_ENABLED=0 go build -o /go/bin/app server.go | ||
|
||
# Copy the exe into a smaller base image | ||
FROM icr.io/codeengine/alpine | ||
COPY --from=0 /server /server | ||
ENTRYPOINT [ "/server" ] | ||
FROM gcr.io/distroless/static-debian12 | ||
COPY --from=build-env /go/bin/app / | ||
CMD ["/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters