-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add Dockerfile examples * specify nodejs dockerfile version
- Loading branch information
1 parent
254fa1a
commit d061f89
Showing
7 changed files
with
78 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM microsoft/dotnet:2.0.0-sdk AS build-env | ||
ADD . /app | ||
WORKDIR /app | ||
RUN dotnet restore -r linux-x64 | ||
RUN dotnet publish -c Release -r linux-x64 | ||
|
||
FROM gcr.io/distroless/dotnet | ||
WORKDIR /app | ||
COPY --from=build-env /app /app/ | ||
#CMD ["dotnet", "bin/Release/netcoreapp2.0/linux-x64/publish/hello.dll"] | ||
CMD ["bin/Release/netcoreapp2.0/linux-x64/publish/hello"] |
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 @@ | ||
FROM golang:1.8 as build-env | ||
|
||
WORKDIR /go/src/app | ||
ADD . /go/src/app | ||
|
||
RUN go-wrapper download # "go get -d -v ./..." | ||
RUN go-wrapper install | ||
|
||
FROM gcr.io/distroless/base | ||
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM openjdk:8-jdk-slim AS build-env | ||
ADD . /app/examples | ||
WORKDIR /app | ||
RUN javac examples/*.java | ||
RUN jar cfe main.jar examples.HelloJava examples/*.class | ||
|
||
FROM gcr.io/distroless/java | ||
COPY --from=build-env /app /app | ||
WORKDIR /app | ||
CMD ["main.jar"] |
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,8 @@ | ||
FROM node:8.9.1 AS build-env | ||
ADD . /app | ||
WORKDIR /app | ||
|
||
FROM gcr.io/distroless/nodejs | ||
COPY --from=build-env /app /app | ||
WORKDIR /app | ||
CMD ["hello.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,8 @@ | ||
FROM python:2.7-slim AS build-env | ||
ADD . /app | ||
WORKDIR /app | ||
|
||
FROM gcr.io/distroless/python2.7 | ||
COPY --from=build-env /app /app | ||
WORKDIR /app | ||
CMD ["hello.py", "/etc"] |
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,8 @@ | ||
FROM python:3-slim AS build-env | ||
ADD . /app | ||
WORKDIR /app | ||
|
||
FROM gcr.io/distroless/python3 | ||
COPY --from=build-env /app /app | ||
WORKDIR /app | ||
CMD ["hello.py", "/etc"] |