-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6d4dfe
commit 080e8b0
Showing
33 changed files
with
246 additions
and
66 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
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,5 +1,5 @@ | ||
//go:build linux && armv7 | ||
// +build linux,armv7 | ||
//go:build linux && arm | ||
// +build linux,arm | ||
|
||
package main | ||
|
||
|
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build amd64 | ||
// +build amd64 | ||
|
||
package docker | ||
|
||
import "embed" | ||
|
||
//go:embed runtimes-amd64 | ||
var runtimes embed.FS | ||
|
||
const runtimesDir = "runtimes-amd64" |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . . | ||
RUN mv fn/* . | ||
RUN chmod +x fn.sh | ||
|
||
CMD [ "./handler.bin" ] |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . . | ||
|
||
RUN npm install ./fn | ||
|
||
CMD [ "node", "functionhandler.js" ] |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY fn/* ./ | ||
RUN python -m pip install -r requirements.txt --user | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
CMD [ "python3", "functionhandler.py" ] |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build arm | ||
// +build arm | ||
|
||
package docker | ||
|
||
import "embed" | ||
|
||
//go:embed runtimes-arm | ||
var runtimes embed.FS | ||
|
||
const runtimesDir = "runtimes-arm" |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY fn/* ./ | ||
RUN chmod +x fn.sh | ||
|
||
CMD [ "./handler.bin" ] |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . . | ||
|
||
RUN npm install ./fn | ||
|
||
CMD [ "node", "functionhandler.js" ] |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY fn/* ./ | ||
RUN python -m pip install -r requirements.txt --user | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
CMD [ "python3", "functionhandler.py" ] |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build arm64 | ||
// +build arm64 | ||
|
||
package docker | ||
|
||
import "embed" | ||
|
||
//go:embed runtimes-arm64 | ||
var runtimes embed.FS | ||
|
||
const runtimesDir = "runtimes-arm64" |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY fn/* ./ | ||
RUN chmod +x fn.sh | ||
|
||
CMD [ "./handler.bin" ] |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY fn fn | ||
|
||
RUN npm install ./fn | ||
|
||
CMD [ "node", "functionhandler.js" ] |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY fn/* ./ | ||
RUN python -m pip install -r requirements.txt --user | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
CMD [ "python3", "functionhandler.py" ] |
Binary file not shown.
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,21 +1,12 @@ | ||
FROM golang:1.20-alpine AS builder | ||
FROM scratch | ||
|
||
WORKDIR /usr/src/build | ||
COPY functionhandler.go . | ||
RUN GO111MODULE=off CGO_ENABLED=0 go build -o handler.bin . | ||
|
||
FROM alpine | ||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY --from=builder /usr/src/build/handler.bin . | ||
|
||
COPY . . | ||
RUN rm functionhandler.go | ||
RUN mv fn/* . | ||
COPY fn/* ./ | ||
RUN chmod +x fn.sh | ||
|
||
CMD [ "./handler.bin" ] |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM golang:1.22-alpine AS builder | ||
|
||
WORKDIR /usr/src/build | ||
COPY functionhandler.go . | ||
RUN GO111MODULE=off CGO_ENABLED=0 go build -o handler.bin . | ||
|
||
FROM alpine:3.19 | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY --from=builder /usr/src/build/handler.bin . |
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,15 +1,13 @@ | ||
#https://nodejs.org/en/docs/guides/nodejs-docker-webapp/ | ||
FROM node:20-alpine | ||
FROM scratch | ||
|
||
ADD blob.tar.gz / | ||
|
||
EXPOSE 8000 | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
RUN npm cache add express | ||
|
||
COPY . . | ||
RUN npm install express | ||
RUN npm install body-parser | ||
COPY fn fn | ||
|
||
RUN npm install ./fn | ||
|
||
CMD [ "node", "functionhandler.js" ] |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#https://nodejs.org/en/docs/guides/nodejs-docker-webapp/ | ||
FROM node:20-alpine | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY functionhandler.js . | ||
COPY package.json . | ||
|
||
RUN npm install express && \ | ||
npm install body-parser && \ | ||
npm cache clean --force |
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM python:3.11-alpine | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY functionhandler.py . |
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
Oops, something went wrong.