589 B
589 B
Step 1: Build the Docker Image
docker build -t my-next-app .
Step 2: Save the Docker Image
docker save my-next-app > my-next-app.tar
Step 3: Transfer the Image to the Production Server
scp my-next-app.tar user@your-server-ip:/path/to/directory
Step 4: Load the Image on the Production Server
ssh user@your-server-ip docker load < my-next-app.tar
Step 5: Run the Docker Container
docker run -d -p 80:3000 my-next-app
Run the entrypoint script in detached mode (so it continues even if your console disconnects): nohup /app/entrypoint.sh > /app/logs/manual-update.log 2>&1 &