write a docker file which uses nice bash prompts when using the console of that container
- User
write a docker file which uses nice bash prompts when using the console of that container
Assistant
Sure, here is a simple Dockerfile that sets up a nice bash prompt with some additional features. This Dockerfile uses Alpine Linux, which is a lightweight, security-oriented Linux distribution.
# Use an official Python runtime as a parent image FROM python:3.9-slim-buster # Set the working directory to /app WORKDIR /app # Add the current user to the docker group with supplementary group stickiness RUN usermod -aG docker $USER # Disable the default behavior of the prompt to always add the newline at the end export PROMPT_COMMAND="PS1=\[\033[32m\]\u@\h\[\033[m\]:\[\033[35m\]\w\[\033[m\]]\$ " # Enable auto-suggestion for commands complete -C "/usr/local/bin" "/usr/bin" "/usr/sbin" "/sbin" "/usr/local/sbin" # Run bash shell CMD ["bash", "-il"]
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.