2023-08-26 22:04:56 +02:00
|
|
|
FROM golang as builder
|
|
|
|
|
|
|
|
LABEL maintainer="Valentin KIVACHUK BURDA"
|
|
|
|
|
|
|
|
ENV DOCKER_ENVIRONMENT=true
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
ENV GOOS=linux
|
|
|
|
ENV GO111MODULE=on
|
|
|
|
|
|
|
|
EXPOSE 49618
|
|
|
|
|
|
|
|
WORKDIR /go/src/oc-search
|
|
|
|
|
|
|
|
#######################################################
|
2023-10-25 11:46:14 +02:00
|
|
|
RUN go install github.com/beego/bee/v2@master
|
2023-08-26 22:04:56 +02:00
|
|
|
|
|
|
|
COPY go.mod .
|
|
|
|
COPY go.sum .
|
|
|
|
RUN go mod download -x
|
|
|
|
|
|
|
|
# COPY . .
|
|
|
|
COPY main.go go.mod go.sum ./
|
|
|
|
|
|
|
|
COPY controllers controllers
|
|
|
|
COPY models models
|
|
|
|
COPY routers routers
|
|
|
|
COPY api-client api-client
|
|
|
|
COPY conf conf
|
|
|
|
COPY static static
|
|
|
|
COPY views views
|
|
|
|
COPY scripts scripts
|
|
|
|
|
2023-10-25 11:46:14 +02:00
|
|
|
# Configuration file : aims at making your variables suit your environment (local, docker, prod, etc)
|
|
|
|
|
2024-02-19 17:38:17 +01:00
|
|
|
COPY docker_search.json /etc/oc/search.json
|
2023-10-25 11:46:14 +02:00
|
|
|
|
2023-08-26 22:04:56 +02:00
|
|
|
# FROM golang
|
|
|
|
|
|
|
|
# WORKDIR /go/src/oc-catalog
|
|
|
|
|
|
|
|
# COPY --from=builder /go/src/oc-catalog .
|
|
|
|
|
|
|
|
ENV DOCKER_ENVIRONMENT=true
|
|
|
|
|
|
|
|
RUN go build .
|
|
|
|
|
|
|
|
|
|
|
|
CMD [ "bee", "run" ]
|