From b45b165f710107c5fef7971d6bb23bde1835ecea Mon Sep 17 00:00:00 2001 From: juancwu <46619361+juancwu@users.noreply.github.com> Date: Wed, 7 Jan 2026 20:55:18 -0500 Subject: [PATCH] add ubuntu-full image --- ubuntu-full/Dockerfile | 40 ++++++++++++++++++++++++++++++++++++++ ubuntu-full/Taskfile.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 ubuntu-full/Dockerfile create mode 100644 ubuntu-full/Taskfile.yml diff --git a/ubuntu-full/Dockerfile b/ubuntu-full/Dockerfile new file mode 100644 index 0000000..0538a75 --- /dev/null +++ b/ubuntu-full/Dockerfile @@ -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 diff --git a/ubuntu-full/Taskfile.yml b/ubuntu-full/Taskfile.yml new file mode 100644 index 0000000..6cc63dc --- /dev/null +++ b/ubuntu-full/Taskfile.yml @@ -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