I
I
Igor2021-04-09 12:15:00
go
Igor, 2021-04-09 12:15:00

Libraries/dependencies not pulling up?

Greetings, maybe someone faced such a problem.
There is a service on GO, it does not work locally until I install the GoLand IDE.
It is necessary to wrap it in docker, after I wrap it accordingly it does not work, I thought that some libraries / dependencies IDE GoLand pulls up by itself, how can I wrap the service in docker, respectively, so that it works.
I'll put the dockerfile below.

FROM golang:1.15 as build 
RUN mkdir /app
WORKDIR /app
COPY . .
RUN CGO_ENABLED=0 go build -o /app/service .

FROM alpine
RUN apk --no-cache add tzdata && mkdir -p /app/conf
ENV TZ=Asia/Almaty
WORKDIR /app
COPY --from=build /app/service /app/
COPY --from=build /app/conf/app.conf /app/conf
COPY --from=build /app/conf/app.yml /app/conf
RUN adduser --disabled-password -u 8835 bmg && chown -R bmg /app/
USER bmg 
ENTRYPOINT ["/app/service"]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2021-04-09
@vitaly_il1

locally not working

What's in the logs?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question