Last active
September 20, 2023 09:02
-
-
Save shri-kanth/834dbdd7dc048a286944603f40fff40b to your computer and use it in GitHub Desktop.
Docker file for development environment without any local installations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the latest Ubuntu as the base image | |
FROM ubuntu:latest | |
# Update package lists and install necessary dependencies | |
RUN apt update -y | |
# Set the entry point to a simple sleep command to keep the container alive | |
CMD ["sleep", "infinity"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build Image
:docker image build -t {IMAGE_NAME} .
Run Container
:docker container run -d --name {CONTAINER_NAME} {IMAGE_NAME}
ssh into container
:docker container exec -it {CONTAINER_NAME} bash