Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions v1/guestbook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ RUN go build -o main main.go

FROM ubuntu:18.04

<Please fill in the required Docker command> --from=builder /app/main /app/guestbook
COPY --from=builder /app/main /app/guestbook

<Please fill in the required Docker command> public/index.html /app/public/index.html
<Please fill in the required Docker command> public/script.js /app/public/script.js
<Please fill in the required Docker command> public/style.css /app/public/style.css
<Please fill in the required Docker command> public/jquery.min.js /app/public/jquery.min.js
ADD public/index.html /app/public/index.html
ADD public/script.js /app/public/script.js
ADD public/style.css /app/public/style.css
ADD public/jquery.min.js /app/public/jquery.min.js

WORKDIR /app

EXPOSE 3000
CMD ["./guestbook"]
<Please fill in the required Docker command> 3000
7 changes: 3 additions & 4 deletions v1/guestbook/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ spec:
app: guestbook
spec:
containers:
- image: us.icr.io/<your sn labs namespace>/guestbook:v1
- image: us.icr.io/sn-labs-abdullahkh25/guestbook:v1
imagePullPolicy: Always
name: guestbook
ports:
- containerPort: 3000
name: http
resources:
limits:
cpu: 50m
cpu: 5m
requests:
cpu: 20m
replicas: 1
cpu: 2m
4 changes: 2 additions & 2 deletions v1/guestbook/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<meta charset="utf-8">
<meta content="width=device-width" name="viewport">
<link href="style.css" rel="stylesheet">
<title>Lavanya's Guestbook - v1</title>
<title>Abdullah's Guestbook - v2</title>
</head>
<body>
<div id="header">
<h1>Guestbook - v1</h1>
<h1>Guestbook - v2</h1>
</div>

<div id="guestbook-entries">
Expand Down