Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adilc patch 6 #46

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0f15d6b
Update main.go
adilc Oct 17, 2023
25ab1cf
Update main.go
adilc Oct 18, 2023
0672262
Update Dockerfile
adilc Oct 18, 2023
0edfe28
Delete main.go
adilc Oct 18, 2023
88d15f6
Create app.py
adilc Oct 18, 2023
5cda2ec
Create requirements.txt
adilc Oct 18, 2023
fd63572
Update Dockerfile
adilc Oct 18, 2023
5b17f94
Merge pull request #1 from adilc/adilc-patch-1
adilc Oct 18, 2023
8e0af2c
Delete app.py
adilc Oct 18, 2023
66e77e2
Delete requirements.txt
adilc Oct 18, 2023
5dc2cb9
Create main.go
adilc Oct 18, 2023
b5c8b53
Update Dockerfile
adilc Oct 18, 2023
0273817
Merge pull request #2 from adilc/adilc-patch-2
adilc Oct 18, 2023
11a67bc
Update Dockerfile
adilc Oct 18, 2023
69bfae7
Update main.go
adilc Oct 18, 2023
cdd2dc8
Update Dockerfile
adilc Oct 18, 2023
b7350df
Merge pull request #3 from adilc/adilc-patch-2
adilc Oct 18, 2023
2d24bf9
Update main.go
adilc Oct 19, 2023
3ef6c1d
Update Dockerfile
adilc Oct 19, 2023
833e842
Create create.py
adilc Oct 19, 2023
ae5db5a
Update Dockerfile
adilc Oct 19, 2023
5837552
Merge pull request #4 from adilc/adilc-patch-2
adilc Oct 19, 2023
673aa79
Update Dockerfile
adilc Oct 19, 2023
93118df
Update create.py
adilc Oct 19, 2023
362c3f1
Update create.py
adilc Oct 20, 2023
ebfa151
Update create.py
adilc Oct 23, 2023
38ca516
Update create.py
adilc Oct 23, 2023
cdd69be
Update Dockerfile
adilc Oct 23, 2023
4aa5675
Merge pull request #5 from adilc/adilc-patch-2
adilc Oct 23, 2023
b450d9c
Delete main.go
adilc Oct 23, 2023
9bcb1fa
Create requirements.txt
adilc Oct 23, 2023
0ac4df3
Update Dockerfile
adilc Oct 23, 2023
aeace31
Update create.py
adilc Oct 23, 2023
7b8ff4c
Create index.html
adilc Oct 23, 2023
1c7a450
Merge pull request #6 from adilc/adilc-patch-3
adilc Oct 23, 2023
ff58b86
Update create.py
adilc Oct 23, 2023
6cacb87
Update create.py
adilc Oct 23, 2023
f954ad1
Delete requirements.txt
adilc Oct 23, 2023
9058d7d
Update Dockerfile
adilc Oct 23, 2023
8385fec
Merge pull request #7 from adilc/adilc-patch-4
adilc Oct 23, 2023
5325e85
Update create.py
adilc Oct 23, 2023
f093da3
Update create.py
adilc Oct 30, 2023
9730043
Delete templates /index.html
adilc Oct 30, 2023
f977a88
Create static.style.css
adilc Oct 30, 2023
7729697
Update create.py
adilc Oct 30, 2023
f5df8bf
Create index.html
adilc Oct 30, 2023
1c72463
Update index.html
adilc Oct 30, 2023
c1537b0
Merge pull request #8 from adilc/adilc-patch-5
adilc Oct 30, 2023
173ff99
Update Dockerfile
adilc Oct 30, 2023
41868d3
Delete static.style.css
adilc Oct 30, 2023
806d21a
Create style.css
adilc Oct 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# This is a multi-stage build. First we are going to compile and then
# create a small image for runtime.
FROM golang:1.11.1 as builder
FROM public.ecr.aws/docker/library/python:3

RUN mkdir -p /go/src/github.com/eks-workshop-sample-api-service-go
WORKDIR /go/src/github.com/eks-workshop-sample-api-service-go
RUN useradd -u 10001 app
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
COPY create.py /
COPY /templates/. /templates

FROM scratch

COPY --from=builder /go/src/github.com/eks-workshop-sample-api-service-go/main /main
COPY --from=builder /etc/passwd /etc/passwd
USER app
RUN pip install Flask
RUN pip install boto3

EXPOSE 8080
CMD ["/main"]

ENTRYPOINT ["python", "create.py"]
15 changes: 15 additions & 0 deletions create.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from flask import Flask
from flask import Flask, render_template
import boto3


app = Flask(__name__)

@app.route('/')
def index():
return render_template('index.html')



if __name__ == '__main__':
app.run(host="0.0.0.0", port=8080)
55 changes: 0 additions & 55 deletions main.go

This file was deleted.

4 changes: 4 additions & 0 deletions static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
background: red;
color: yellow;
}
8 changes: 8 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<link rel="stylesheet" href='/static/style.css' />
</head>
<body>
<h1>GitHubv2 CodePipeline EKS Sample</h1>
</body>
</html>