add ubuntu-full image

This commit is contained in:
juancwu 2026-01-07 20:55:18 -05:00
commit b45b165f71
2 changed files with 82 additions and 0 deletions

40
ubuntu-full/Dockerfile Normal file
View file

@ -0,0 +1,40 @@
FROM ubuntu:24.04
# Prevent interactive prompts during install
ENV DEBIAN_FRONTEND=noninteractive
# Install Base Tools (curl, wget, ssh, git, build-essential)
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
openssh-client \
build-essential \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js (using NodeSource for latest LTS) and pnpm
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g pnpm \
&& npm install -g tailwindcss @tailwindcss/cli
# Install Go 1.25.1
# Downloads the binary tarball and installs to /usr/local/go
RUN wget https://go.dev/dl/go1.25.1.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go1.25.1.linux-amd64.tar.gz \
&& rm go1.25.1.linux-amd64.tar.gz
# Set Go environment variables
ENV PATH="/usr/local/go/bin:${PATH}"
ENV GOPATH="/go"
ENV PATH="${GOPATH}/bin:${PATH}"
# Install Task (v3.46.4)
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin v3.46.4
# Install Templ (v0.3.960)
RUN go install github.com/a-h/templ/cmd/templ@v0.3.960
# Verify installations (Optional, for debugging build)
RUN node -v && go version && task --version && templ --version

42
ubuntu-full/Taskfile.yml Normal file
View file

@ -0,0 +1,42 @@
version: '3'
vars:
REGISTRY: git.juancwu.dev
OWNER: juancwu
IMAGE_NAME: ubuntu-24.04
VERSION: latest
FULL_IMAGE: "{{.REGISTRY}}/{{.OWNER}}/{{.IMAGE_NAME}}:{{.VERSION}}"
tasks:
default:
desc: "Builds the image"
cmds:
- task: build
login:
desc: "Login to the private registry (interactive)"
cmds:
- echo "Logging into {{.REGISTRY}}..."
- docker login {{.REGISTRY}}
build:
desc: "Build the Docker image locally"
cmds:
- echo "Building {{.FULL_IMAGE}}..."
- docker build -t {{.FULL_IMAGE}} .
push:
desc: "Build and push the image to the registry"
deps: [build]
cmds:
- echo "Pushing to registry..."
- docker push {{.FULL_IMAGE}}
test:
desc: "Run a quick sanity check on the built image"
deps: [build]
cmds:
- echo "Testing Go version..."
- docker run --rm {{.FULL_IMAGE}} go version
- echo "Testing Tailwind CLI..."
- docker run --rm {{.FULL_IMAGE}} tailwindcss --help
- echo "Testing Node version..."
- docker run --rm {{.FULL_IMAGE}} node -v
clean:
desc: "Remove the local docker image to free space"
cmds:
- docker rmi {{.FULL_IMAGE}} || true