-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from phuuthanh-dev/develop
Develop
- Loading branch information
Showing
5 changed files
with
247 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
# Dùng official SQL Server 2019 image của Microsoft | ||
FROM mcr.microsoft.com/mssql/server:2019-latest | ||
# Use the official MySQL image | ||
FROM mysql:8.2.0 | ||
|
||
# Copy the SQL script vào container | ||
COPY init.sql /usr/src/app/init.sql | ||
# Set environment variables for MySQL | ||
ENV MYSQL_ALLOW_EMPTY_PASSWORD yes | ||
ENV MYSQL_DATABASE=DB_AUCTION | ||
ENV MYSQL_COLLATION=utf8mb4_general_ci | ||
|
||
# Chạy lệnh trong file sql | ||
RUN /opt/mssql/bin/sqlservr & sleep 30 \ | ||
&& /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Thanhth@nh1 -i /usr/src/app/init.sql \ | ||
&& pkill sqlservr | ||
# Copy the SQL script into the container | ||
COPY init.sql /docker-entrypoint-initdb.d/init.sql | ||
|
||
EXPOSE 1433 | ||
# Khởi động sql server | ||
CMD ["/opt/mssql/bin/sqlservr"] | ||
# Expose MySQL port | ||
EXPOSE 3306 |
Oops, something went wrong.