We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bde6485 commit c94c57cCopy full SHA for c94c57c
2 files changed
Dockerfile
@@ -1,15 +1,11 @@
1
-FROM golang:latest
+FROM golang:1.15-alpine
2
3
-ENV GO111MODULE=on
+WORKDIR /build/
4
5
-RUN go get github.com/AdminTurnedDevOps/GoWebAPI
+COPY /main/* /build/
6
7
-WORKDIR /build
8
-
9
-COPY main /build
+RUN cd /build && go build -o main /build
10
11
EXPOSE 8080
12
13
-RUN go build -o main /build
14
15
CMD [ "cd /build && ./main" ]
main/main.go
@@ -26,5 +26,5 @@ func request1() {
26
http.HandleFunc("/", homePage)
27
http.HandleFunc("/aboutme", aboutMe)
28
29
- log.Fatal(http.ListenAndServe(":8081", nil))
+ log.Fatal(http.ListenAndServe(":8080", nil))
30
}
0 commit comments