Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Use the official Ubuntu 22.04 base image
ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}

# Set environment variables to avoid interactive installation prompts
ARG DEBIAN_FRONTEND=noninteractive
ARG TZ=UTC

# Update
RUN apt-get update

# Install required packages
RUN apt-get install -y \
software-properties-common \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release \
tzdata \
git \
jq \
curl \
# Dev tools
build-essential \
zlib1g-dev \
libncurses5-dev \
libgdbm-dev \
libnss3-dev \
libssl-dev \
libreadline-dev \
libffi-dev \
libsqlite3-dev \
wget \
libbz2-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set Python version as an argument
ARG PYTHON_VERSION=3.11.3
# Install Python with specified version
RUN mkdir /tmp/python_env/ && \
cd /tmp/python_env/ && \
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \
tar -xf Python-${PYTHON_VERSION}.tgz && \
cd Python-${PYTHON_VERSION} && \
./configure --enable-optimizations && \
make -j$(nproc) && \
make install && \
cd / && \
rm -rf /tmp/python_env/

# Install pip for Python 3.11
RUN curl -k https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.11 get-pip.py && \
rm get-pip.py

# Cleanup
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Reset environment variables
ENV DEBIAN_FRONTEND teletype
ENV TZ=""

# Set the working directory
WORKDIR /root

# Define the default command to run when the container starts
CMD ["/bin/bash"]
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,42 @@

Before you begin, make sure you have [Docker](https://docs.docker.com/engine/install/) installed. It's also beneficial to have a basic understanding of Docker concepts.

## How to Build

1. **Clone the Repository:**

```bash
git clone https://github.com/your-username/devops-toolkit.git
```

2. **Navigate to the Repository:**

```bash
cd devops-toolkit
```

3. **Navigate to the Repository:**

```bash
docker build -t devops-toolkit:latest .
```

4. **Run the Docker Image (Optional):**

- Start container

```bash
docker run -it --rm devops-toolkit
```

- Check python version

```bash
docker run --rm devops-toolkit python3 --version
```

<!-- 5. **Customize the Build (Optional):** -->

## Contributing

- See: [CONTRIBUTING.md](./CONTRIBUTING.md)
Expand Down
1 change: 1 addition & 0 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- https://stackoverflow.com/questions/62154016/docker-on-wsl2-very-slow