我正在使用 npm 构建一个 React Javascript 应用程序,并希望将其部署在 docker 上。
当我在本地运行应用程序时:
npm start
Run Code Online (Sandbox Code Playgroud)
这一切都很好。但是当我构建一个 Docker 镜像并测试它时,我得到了以下错误:
$ docker run react-app
> keycloak-react@0.1.0 start /
> react-scripts start
? ?wds?: Project is running at http://172.17.0.2/
? ?wds?: webpack output is served from
? ?wds?: Content not from webpack is served from /public
? ?wds?: 404s will fallback to /
Starting the development server...
Run Code Online (Sandbox Code Playgroud)
Dockerfile 看起来像:
FROM node:latest
COPY ./keycloak-react .
RUN npm install typescript
RUN npm install node-sass
RUN npm install sass
RUN …Run Code Online (Sandbox Code Playgroud) 我有一个正在运行的 MySQL (MariaDB) 服务器在我的树莓派上运行。当我想从本地网络连接到它时,它工作得很好。
我的规格如下:
MariaDB [mysql]> SHOW VARIABLES LIKE "%version%";
+-----------------------------------+------------------------------------------+
| Variable_name | Value |
+-----------------------------------+------------------------------------------+
| in_predicate_conversion_threshold | 1000 |
| innodb_version | 10.3.22 |
| protocol_version | 10 |
| slave_type_conversions | |
| system_versioning_alter_history | ERROR |
| system_versioning_asof | DEFAULT |
| version | 10.3.22-MariaDB-0+deb10u1 |
| version_comment | Raspbian 10 |
| version_compile_machine | armv8l |
| version_compile_os | debian-linux-gnueabihf |
| version_malloc_library | system |
| version_source_revision | 0152704ae3f857668dbc05803950adcf131b8685 |
| version_ssl_library …Run Code Online (Sandbox Code Playgroud) 我正在使用 Linux Ubuntu 18.04 和 python 3。我试图在 maria-db 和我的 python 脚本之间建立连接。因此我必须安装 mariadb 包。
我已经安装了:
sudo apt install mariadb-server
Run Code Online (Sandbox Code Playgroud)
但是当我尝试:
pip install mariadb
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Collecting mariadb
Using cached mariadb-1.0.0.tar.gz (78 kB)
ERROR: Command errored out with exit status 1:
command: /home/niklas/Desktop/Stuff/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pycharm-packaging/mariadb/setup.py'"'"'; __file__='"'"'/tmp/pycharm-packaging/mariadb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-wfnscxnz
cwd: /tmp/pycharm-packaging/mariadb/
Complete output (12 lines):
/bin/sh: 1: mariadb_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File …Run Code Online (Sandbox Code Playgroud)