Skip to content

Commit f3f2d05

Browse files
committed
re-worked and tested quite some samples
1 parent 7ddab05 commit f3f2d05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+262
-2030
lines changed

app-n-job/Dockerfile

Lines changed: 0 additions & 8 deletions
This file was deleted.

app-n-job/README.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

app-n-job/app-n-job.go

Lines changed: 0 additions & 25 deletions
This file was deleted.

app-n-job/build

Lines changed: 0 additions & 19 deletions
This file was deleted.

app-n-job/run

Lines changed: 0 additions & 52 deletions
This file was deleted.

app2job/Dockerfile.app

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
FROM icr.io/codeengine/golang:alpine
2-
COPY app.go /
3-
RUN go build -o /app /app.go
1+
FROM quay.io/projectquay/golang:1.22 AS build-env
2+
WORKDIR /go/src/app
3+
COPY app.go .
4+
5+
RUN CGO_ENABLED=0 go build -o /go/bin/app app.go
46

57
# Copy the exe into a smaller base image
6-
FROM icr.io/codeengine/alpine
7-
COPY --from=0 /app /app
8-
CMD /app
8+
FROM gcr.io/distroless/static-debian12
9+
COPY --from=build-env /go/bin/app /
10+
CMD ["/app"]

app2job/Dockerfile.job

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
FROM icr.io/codeengine/golang:alpine
2-
COPY job.go /
3-
RUN go build -o /job /job.go
1+
FROM quay.io/projectquay/golang:1.22 AS build-env
2+
WORKDIR /go/src/app
3+
COPY job.go .
4+
5+
RUN CGO_ENABLED=0 go build -o /go/bin/job job.go
46

57
# Copy the exe into a smaller base image
6-
FROM icr.io/codeengine/alpine
7-
COPY --from=0 /job /job
8-
CMD /job
8+
FROM gcr.io/distroless/static-debian12
9+
COPY --from=build-env /go/bin/job /
10+
CMD ["/job"]

app2job/run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ export REGISTRY=${REGISTRY:-icr.io/codeengine}
2323
export COUNT=${COUNT:-50}
2424

2525
# Create the app
26-
ibmcloud ce app create -n a2j-app --image ${REGISTRY}/a2j-app
26+
ibmcloud ce app create -n a2j-app --cpu .125 --memory 0.25G --image ${REGISTRY}/a2j-app
2727

2828
# Get metadata about the app for later use
2929
URL=$(ibmcloud ce app get -n a2j-app -o url)
3030

3131
# Create the job definition
32-
ibmcloud ce job create -n a2j-job --ai=1-${COUNT} --image ${REGISTRY}/a2j-job
32+
ibmcloud ce job create -n a2j-job --ai=1-${COUNT} --cpu .125 --memory 0.25G --image ${REGISTRY}/a2j-job
3333

3434
# Now, curl the app and see if it creates the job
3535
curl -fs ${URL}/a2j-job -X PUT | tee out

bash/Dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

bash/README.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

bash/app

Lines changed: 0 additions & 6 deletions
This file was deleted.

bash/build

Lines changed: 0 additions & 19 deletions
This file was deleted.

bash/init

Lines changed: 0 additions & 16 deletions
This file was deleted.

bash/run

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)