forked from rnzsgh/eks-workshop-sample-api-service-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from adilc/adilc-patch-1
Adilc patch 1
- Loading branch information
Showing
4 changed files
with
20 additions
and
28 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,14 +1,7 @@ | ||
FROM golang:1.16-buster AS builder | ||
FROM python:3.6 | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
COPY go.* ./ | ||
RUN go mod download | ||
COPY *.go ./ | ||
RUN go build -o /hello_go_http | ||
# Create a new release build stage | ||
FROM gcr.io/distroless/base-debian10 | ||
# Set the working directory to the root directory path | ||
WORKDIR / | ||
# Copy over the binary built from the previous stage | ||
COPY --from=builder /hello_go_http /hello_go_http | ||
EXPOSE 8080 | ||
ENTRYPOINT ["/hello_go_http"] | ||
RUN pip install -r requirements.txt | ||
ENTRYPOINT ["python"] | ||
CMD ["app.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from flask import Flask | ||
import os | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route("/") | ||
def hello(): | ||
return "Flask inside Docker!!" | ||
|
||
|
||
if __name__ == "__main__": | ||
port = int(os.environ.get("PORT", 8080)) | ||
app.run(debug=True,host='0.0.0.0',port=port) |
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 |