# docker-egg-test **Repository Path**: secretx500/docker-egg-test ## Basic Information - **Project Name**: docker-egg-test - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-11 - **Last Updated**: 2021-09-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # docker-egg-test ## 本地可以正常链接数据库 ```bash git clone https://gitee.com/liaohui5/docker-egg-test cd docker-egg-test npm i npm run dev ``` ## 我的数据库 sql 文件 ```sql CREATE DATABASE IF NOT EXISTS `docker_egg_test`; use `docker_egg_test`; CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `name` varchar(30) DEFAULT NULL COMMENT 'user name', `age` int(11) DEFAULT NULL COMMENT 'user age', `created_at` datetime DEFAULT NULL COMMENT 'created time', `updated_at` datetime DEFAULT NULL COMMENT 'updated time', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='user'; ``` ## 但是使用 docker-compose up 去运行就无法正常链接数据库 ```bash docker-compose up --build ``` ![err](https://user-images.githubusercontent.com/29266093/132952488-be4523b9-627b-4f47-8d91-5044ea37f150.png)