Files
open-im-server/cmd/api/deploy.Dockerfile
T

26 lines
871 B
Docker
Raw Normal View History

2023-06-16 11:22:47 +08:00
FROM golang as build
# go mod Installation source, container environment variable addition will override the default variable value
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn,direct
2023-06-16 11:45:33 +08:00
RUN mkdir -p /Open-IM-Server
COPY ../* /Open-IM-Server
2023-06-16 11:44:13 +08:00
WORKDIR /Open-IM-Server/cmd/api
2023-06-16 11:22:47 +08:00
RUN apt-get update && apt-get install apt-transport-https && apt-get install procps\
&&apt-get install net-tools
#Non-interactive operation
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y vim curl tzdata gawk
#Time zone adjusted to East eighth District
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
RUN make build
VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config"]
CMD ["${WORKDIR}/open_im_api","--port", "10002"]