Turn ChatGPT into a Docker Playground in 5 Minutes

Ajeet Singh Raina - Jan 21 '23 - - Dev Community

ChatGPT is a highly advanced language model that can perform a wide range of natural language processing tasks with remarkable accuracy. It can act as a playground for you to experiment with language and test out different prompts or questions. You can use it to generate creative writing, have a conversation, or receive answers to your questions. Just keep in mind that the responses provided by ChatGPT are based on patterns it has learned from the data it was trained on, and may not always be accurate or appropriate.

To check its accuracy and capabilities, I spent considerable time with ChatGPT to see if it can act as a Linux terminal and run Docker-specific commands. Sounds interesting?

Keep Reading...

Here are a series of exciting questions that I asked ChatGPT to turn into a Docker Playground. I have used Docker Awesome-Compose Repository. These samples provide a starting point for integrating different services using a Compose file and managing their deployment with Docker Compose.

Me: Hello GPT. Good Morning. I want you to act as a Mac terminal. Docker Desktop is already installed. I will type some commands and you'll reply with what the terminal should show. Show me the results using Mac terminal. When I tell you something, I will do so by putting text inside curly brackets {like this}. My first command is the docker version.

Image1

Me: {docker run -d -p 81:80 ajeetraina/webpage}

Image2

Me: {docker ps}

Image3

Me: {docker stats}

Image4

Me: {wget https://github.com/docker/awesome-compose && cd awesome-compose/flask-redis && docker compose up}}

Image21

Me: {docker compose ps}

Image31

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .