0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Linux Laravelsail

Last updated at Posted at 2023-05-21

コマンドは sudo su -
の後に入力してください。

Centos8

yum update
dnf -y remove podman
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf -y install --nobest docker-ce docker-ce-cli
dnf -y update docker-ce
systemctl enable docker
systemctl start docker
dnf upgrade
chmod +x /usr/local/bin/docker-compose
docker-compose --vesrion
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker ps -a
reboot
sudo usermod -aG docker USER
curl -s https://laravel.build/Laradocker | bash
cd Laradocker
chmod -R 777 storage
./vendor/bin/sail up

ubuntu


sudo curl https://get.docker.com | sh
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt-cache policy docker-ce
sudo apt install docker-ce

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose -v

sudo usermod -aG docker $USER
sudo systemctl start docker
sudo systemctl enable docker
docker --version
docker-compose --version
sudo reboot

curl -s https://laravel.build/Laradock | bash
cd Laradock
chmod -R 777 storage
./vendor/bin/sail up

起動後は
http://localhost/
で画面が表示されれば成功です。
次からコマンド長いなと思った人は下記のエイリアスをご確認お願いします。


vi ~/.bashrc

# Laravel Sail Command Alias
alias sail="./vendor/bin/sail"


上記を適当にスクリプトの影響のなさそうな場所に入れて保存。
最後尾等が割とオススメです!
最後に再読み込み。
source ~/.bashrc

登録後Laravel Sailの起動等は下記のようなコマンドになります。


シャットダウン
sail stop

立ち上げ
sail up

バックグラウンド立ち上げ
sail up -d

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?