-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
f06b588
commit 0147ab7
Showing
9 changed files
with
104 additions
and
30 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 +1,22 @@ | ||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 | ||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch as dev | ||
|
||
RUN mkdir /work/ | ||
WORKDIR /work/ | ||
|
||
COPY ./src/work.csproj /work/work.csproj | ||
RUN dotnet restore | ||
|
||
COPY ./src/ /work/ | ||
RUN mkdir /out/ | ||
RUN dotnet publish --no-restore --output /out/ --configuration Release | ||
|
||
|
||
###########START NEW IMAGE########################################### | ||
|
||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim as prod | ||
|
||
RUN mkdir /app/ | ||
WORKDIR /app/ | ||
COPY --from=dev /out/ /app/ | ||
RUN chmod +x /app/ | ||
CMD dotnet work.dll |
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
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,9 +1,18 @@ | ||
FROM golang:1.12.5-alpine3.9 as builder | ||
FROM golang:1.12.5-alpine3.9 as dev | ||
|
||
# installing git | ||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache git | ||
|
||
RUN go get github.com/sirupsen/logrus | ||
RUN go get github.com/buaazp/fasthttprouter | ||
RUN go get github.com/valyala/fasthttp | ||
RUN go get github.com/valyala/fasthttp | ||
|
||
WORKDIR /work | ||
COPY ./src /work/ | ||
RUN go build -o app | ||
###########START NEW IMAGE################### | ||
|
||
FROM alpine:3.9 as prod | ||
COPY --from=dev /work/app / | ||
CMD ./app |
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 +1,16 @@ | ||
FROM node:12.4.0-alpine | ||
FROM node:12.4.0-alpine as dev | ||
|
||
RUN mkdir /work/ | ||
WORKDIR /work/ | ||
|
||
COPY ./src/package.json /work/package.json | ||
RUN npm install | ||
|
||
COPY ./src/ /work/ | ||
|
||
|
||
###########START NEW IMAGE################### | ||
|
||
FROM dev as prod | ||
|
||
CMD node . |
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,3 +1,21 @@ | ||
FROM python:3.7.3-alpine3.9 | ||
FROM python:3.7.3-alpine3.9 as dev | ||
|
||
RUN pip install flask | ||
RUN mkdir /work/ | ||
WORKDIR /work/ | ||
|
||
COPY ./src/requirements.txt /work/requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
COPY ./src/ /work/ | ||
|
||
###########START NEW IMAGE################### | ||
|
||
FROM python:3.7.3-alpine3.9 as prod | ||
|
||
RUN mkdir /app/ | ||
WORKDIR /app/ | ||
|
||
COPY --from=dev /work/ /app/ | ||
RUN pip install -r requirements.txt | ||
ENV FLASK_APP=server.py | ||
CMD flask run -h 0.0.0 -p 5000 |
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 @@ | ||
Flask == 1.0.3 |