docker update
This commit is contained in:
@@ -8,14 +8,15 @@ RUN go mod tidy
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -a installsuffix cgo -o main .
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
|
||||||
|
# RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
RUN apk --no-cache add ca-certificates
|
RUN apk --no-cache add ca-certificates
|
||||||
|
|
||||||
WORKDIR /root/
|
WORKDIR /root/
|
||||||
|
|
||||||
# COPY --from=builder /app/main .
|
COPY --from=builder /app/main .
|
||||||
COPY --from=builder /app/.env .
|
COPY --from=builder /app/.env .
|
||||||
EXPOSE 80
|
EXPOSE 8080
|
||||||
CMD ["./main"]
|
CMD ["./main"]
|
||||||
@@ -7,7 +7,7 @@ services:
|
|||||||
container_name: api-rssa
|
container_name: api-rssa
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 6000:80
|
- 8080:8080
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user