(주)누리웨어

화상연동/Web,APP 구축및서비스/LMS/평생교육/학점은행/기업교육/연수관리/설문구축/

Mac 에 docker 에 MsSQL 2022 설치

1.다운로드

HaengHoui-MacBookPro:var haenghokang$ docker pull mcr.microsoft.com/mssql/server:2022-latest
2022-latest: Pulling from mssql/server
d9043883789c: Pull complete
186a7f1a30ef: Pull complete
86752e6fd4ef: Pull complete
Digest: sha256:ea73825f3d88a23c355ac2f9fdc6bd960fec90171c12c572109b36a558f77bb8
Status: Downloaded newer image for mcr.microsoft.com/mssql/server:2022-latest
mcr.microsoft.com/mssql/server:2022-latest

2.설치

HaengHoui-MacBookPro:~ haenghokang$ docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=!Hhkang4475@' -p 1433:1433 --name MSSQL_2022 -d mcr.microsoft.com/mssql/server:2022-latest
9fc14b332e25fc4a2c7af31d22348d5140a51b2c661ab68a0b244ffa595e3f09

3.확인

HaengHoui-MacBookPro:var haenghokang$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4d441ea58795 mcr.microsoft.com/mssql/server:2022-latest "/opt/mssql/bin/laun…" 6 seconds ago Up 5 seconds 0.0.0.0:1433->1433/tcp MSSQL_2022

4.Container 진입
HaengHoui-MacBookPro:var haenghokang$ docker exec -it MSSQL_2022 “bash”
mssql@4d441ea58795:/$ pwd
/

5.Container version 확인
mssql@4d441ea58795:/opt$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION=”Ubuntu 22.04.5 LTS”
PRETTY_NAME=”Ubuntu 22.04.5 LTS”
NAME=”Ubuntu”
VERSION_ID=”22.04″
VERSION=”22.04.5 LTS (Jammy Jellyfish)”
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL=”https://www.ubuntu.com/”
SUPPORT_URL=”https://help.ubuntu.com/”
BUG_REPORT_URL=”https://bugs.launchpad.net/ubuntu/”
PRIVACY_POLICY_URL=”https://www.ubuntu.com/legal/terms-and-policies/privacy-policy”
UBUNTU_CODENAME=jammy

6.MSSQL 접속
mssql@4d441ea58795:/opt/mssql-tools18/bin$ ./sqlcmd -S localhost -U sa -C
Password:
1> select @@VERSION;
2> GO

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2022 (RTM-CU18) (KB5050771) - 16.0.4185.3 (X64)
Feb 28 2025 18:24:49
Copyright (C) 2022 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 22.04.5 LTS)

(1 rows affected)
1> exit

Comments are currently closed.