Working dockerfile
This commit is contained in:
parent
9969775f9d
commit
7b924ffa06
14
Dockerfile
14
Dockerfile
@ -1,13 +1,13 @@
|
|||||||
FROM golang:1.17 as base
|
FROM golang:1.17 as base
|
||||||
|
|
||||||
COPY go.mod /
|
WORKDIR /app
|
||||||
COPY go.sum /
|
COPY go.mod .
|
||||||
|
COPY go.sum .
|
||||||
|
|
||||||
FROM base as source
|
FROM base as source
|
||||||
# WORKDIR /app
|
COPY ./*.go /app/
|
||||||
COPY ./*.go /src/
|
|
||||||
|
|
||||||
RUN ls /src
|
RUN ls /app/
|
||||||
RUN go build -o freego_api /src
|
RUN go build -o freego_api .
|
||||||
EXPOSE 1379
|
EXPOSE 1379
|
||||||
# CMD [ "./freego_api" ]
|
CMD [ "./freego_api" ]
|
@ -5,3 +5,5 @@ services:
|
|||||||
- 3000:3000
|
- 3000:3000
|
||||||
api:
|
api:
|
||||||
build: .
|
build: .
|
||||||
|
ports:
|
||||||
|
- 1379:1379
|
Loading…
Reference in New Issue
Block a user