docker update
This commit is contained in:
@@ -8,14 +8,15 @@ RUN go mod tidy
|
||||
|
||||
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
|
||||
RUN apk --no-cache add ca-certificates
|
||||
|
||||
WORKDIR /root/
|
||||
|
||||
# COPY --from=builder /app/main .
|
||||
COPY --from=builder /app/main .
|
||||
COPY --from=builder /app/.env .
|
||||
EXPOSE 80
|
||||
EXPOSE 8080
|
||||
CMD ["./main"]
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
container_name: api-rssa
|
||||
restart: always
|
||||
ports:
|
||||
- 6000:80
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- .:/app
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user