Sign inSign up

psoulek/batchgunk

By psoulek

•Updated over 1 year ago

Image
0

1.3K

psoulek/batchgunk repository overview

⁠Use Ubuntu 22.04 as the base image

FROM ubuntu:22.04

⁠Set environment variables for non-interactive installation

ENV DEBIAN_FRONTEND=noninteractive

⁠Set the maintainer label

LABEL maintainer="[email protected]⁠"

⁠Install required packages

RUN apt-get update && apt-get install -y --no-install-recommends
bash
curl
nmap
python3
python3-crcmod
python3-openssl
openssh-client
git
nginx
unzip
wget
ca-certificates
lsb-release
gnupg
fuse
software-properties-common
&& rm -rf /var/lib/apt/lists/*

⁠Install yq

RUN wget https://github.com/mikefarah/yq/releases/download/v4.24.5/yq_linux_amd64⁠ -O /usr/bin/yq &&
chmod +x /usr/bin/yq

⁠Install Helm

RUN curl -L https://get.helm.sh/helm-v3.10.0-linux-amd64.tar.gz⁠ | tar xz &&
mv linux-amd64/helm /usr/local/bin/helm &&
rm -rf linux-amd64

⁠Install Google Cloud SDK

RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-379.0.0-linux-x86_64.tar.gz⁠ &&
tar xzf google-cloud-sdk-379.0.0-linux-x86_64.tar.gz &&
rm google-cloud-sdk-379.0.0-linux-x86_64.tar.gz &&
ln -s /google-cloud-sdk/bin/gcloud /usr/bin/gcloud

⁠Install Terraform

RUN wget https://releases.hashicorp.com/terraform/1.2.0/terraform_1.2.0_linux_amd64.zip⁠ &&
unzip terraform_1.2.0_linux_amd64.zip -d /usr/local/bin &&
rm terraform_1.2.0_linux_amd64.zip

⁠Install kubectl

RUN curl -LO "https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl⁠" &&
chmod +x kubectl &&
mv kubectl /usr/local/bin/kubectl

⁠Install Docker

RUN install -m 0755 -d /etc/apt/keyrings &&
curl -fsSL https://download.docker.com/linux/ubuntu/gpg⁠ |
gpg --dearmor -o /etc/apt/keyrings/docker.gpg &&
chmod a+r /etc/apt/keyrings/docker.gpg &&
echo
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg]
https://download.docker.com/linux/ubuntu⁠
$(lsb_release -cs) stable" |
tee /etc/apt/sources.list.d/docker.list > /dev/null &&
apt-get update &&
apt-get install -y --no-install-recommends docker-ce-cli &&
rm -rf /var/lib/apt/lists/*

⁠Install gcsfuse

⁠Add Google Cloud public key

RUN curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg⁠ |
gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg

⁠Add the gcsfuse repository for jammy

RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt⁠ gcsfuse-jammy main" |
tee /etc/apt/sources.list.d/gcsfuse.list

⁠Update APT package index and install gcsfuse

RUN apt-get update &&
apt-get install -y --no-install-recommends gcsfuse &&
rm -rf /var/lib/apt/lists/*

⁠Verify gcsfuse installation

RUN gcsfuse --version

⁠Create mount point directory

RUN mkdir -p /mnt/gcs

⁠Expose port 80 for the web server

EXPOSE 80

⁠Create a custom Nginx configuration file

RUN echo "daemon off;" > /etc/nginx/nginx.conf &&
echo "error_log /dev/stdout info;" >> /etc/nginx/nginx.conf &&
echo 'events {}' >> /etc/nginx/nginx.conf &&
echo 'http { log_format main "$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$request_uri""; access_log /dev/stdout main; server { listen 80; location / { return 200 "Hello from Nginx\n"; } } }' >> /etc/nginx/nginx.conf

⁠Start Nginx

CMD ["nginx"]

Tag summary

Content type

Image

Digest

sha256:984eac908…

Size

297.1 MB

Last updated

over 1 year ago

docker pull psoulek/batchgunk:0.1.0