代码拉取完成,页面将自动刷新
同步操作将从 fagongzi/gateway 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
FROM alpine:latest
ARG APP_ROOT=/app/gateway
ARG EXEC_NAME=proxy
ARG UID=2019
ARG CMD_NAME=demo
ENV CURRENT_EXEC_PATH=${APP_ROOT}/${EXEC_NAME}
ENV PATH=${APP_ROOT}:$PATH
WORKDIR ${APP_ROOT}
ADD dist ${APP_ROOT}
# Alpine Linux doesn't use pam, which means that there is no /etc/nsswitch.conf,
# but Golang relies on /etc/nsswitch.conf to check the order of DNS resolving
# (see https://github.com/golang/go/commit/9dee7771f561cf6aee081c0af6658cc81fac3918)
# To fix this we just create /etc/nsswitch.conf and add the following line:
# hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
RUN MAIN_VERSION=$(cat /etc/alpine-release | cut -d '.' -f 0-2) \
&& mv /etc/apk/repositories /etc/apk/repositories-bak \
&& { \
echo "https://mirrors.aliyun.com/alpine/v${MAIN_VERSION}/main"; \
echo "https://mirrors.aliyun.com/alpine/v${MAIN_VERSION}/community"; \
} >> /etc/apk/repositories \
&& apk add --update --no-cache libcap \
&& addgroup -g ${UID} -S gateway \
&& adduser -u ${UID} -S gateway -G gateway \
&& mkdir -p ${APP_ROOT}/plugins \
&& chown -R gateway:gateway ./ \
&& if [ -e ${CURRENT_EXEC_PATH} ]; then \
setcap CAP_NET_BIND_SERVICE=+eip ${CURRENT_EXEC_PATH}; \
fi \
&& echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf \
&& echo -n ${CMD_NAME} > cmd
USER gateway
EXPOSE 80 2379 9092 9093
ENTRYPOINT ["/bin/sh", "./entrypoint.sh"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。