Skip to content

Commit

Permalink
Merge pull request #1 from adilc/adilc-patch-1
Browse files Browse the repository at this point in the history
Adilc patch 1
  • Loading branch information
adilc authored Oct 18, 2023
2 parents 0672262 + fd63572 commit 5b17f94
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 28 deletions.
19 changes: 6 additions & 13 deletions Dockerfile
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"]
13 changes: 13 additions & 0 deletions app.py
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)
15 changes: 0 additions & 15 deletions main.go

This file was deleted.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flask

0 comments on commit 5b17f94

Please sign in to comment.