Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

根据docker部署后,使用含有中文SQL时报错 #71

Closed
rovast opened this issue Nov 29, 2018 · 4 comments
Closed

根据docker部署后,使用含有中文SQL时报错 #71

rovast opened this issue Nov 29, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@rovast
Copy link

rovast commented Nov 29, 2018

image

测试SQL

CREATE TABLE `rs_ticket_theme_multi` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
COMMENT = '测试';

按照 docker 部署后,中文不支持,英文正常。

但是如果在自己的真机(deepin15.7)上部署,可以正常使用中文。

@xiyangxixian xiyangxixian added the bug Something isn't working label Nov 29, 2018
@xiyangxixian
Copy link
Owner

@rovast 明天会查一下问题,谢谢反馈。

@rovast
Copy link
Author

rovast commented Nov 29, 2018 via email

@xiyangxixian
Copy link
Owner

docker里面用的还是 python 2 的环境可能会有点问题, 推荐在python 3 环境下运行, python 2下是兼容模式, 可能会造成一些问题, 之后会更新docker 镜像和docker file

@rovast
Copy link
Author

rovast commented Nov 30, 2018

以下是我自己的 Dockfile,自动构建后可用

#
# BUILD FOR SOAR-WEB
# AUTHOR: <rovast@163.com>
#

FROM ubuntu:18.04

# dependencies required for running "phpize"
# (see persistent deps below)
ENV SOAR_WEB_PACKAGE_DEPS \
		git \
		python \
		python-pip

# persistent / runtime deps
RUN apt-get update && apt-get install -y \
		$SOAR_WEB_PACKAGE_DEPS \
	    && rm -r /var/lib/apt/lists/*

RUN git clone https://github.com/rovast/soar-web.git /opt/soar-web
RUN cd /opt/soar-web && pip install -r requirement.txt
RUN chmod -R 755 /opt/soar-web   
EXPOSE 5088
CMD ["python","/opt/soar-web/soar-web.py"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants