Skip to content

Commit

Permalink
refactor(coder): rename dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
tuana9a committed Jul 29, 2024
1 parent 6d12b82 commit 820868e
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build-push-coder-adrazaamon-devops
on:
pull_request:
paths:
- "502-coder/docker/coder/Dockerfile.adrazaamon-devops"
- "502-coder/docker/coder/adrazaamon-devops.Dockerfile"

jobs:
build-and-push:
Expand All @@ -26,7 +26,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: 502-coder/docker/coder
file: 502-coder/docker/coder/Dockerfile.adrazaamon-devops
file: 502-coder/docker/coder/adrazaamon-devops.Dockerfile
push: true
tags: tuana9a/coder:adrazaamon-devops
cache-from: type=gha
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/502-docker-build-push-coder-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build-push-coder-base
on:
pull_request:
paths:
- "502-coder/docker/coder/Dockerfile.base"
- "502-coder/docker/coder/base.Dockerfile"

jobs:
build-and-push:
Expand All @@ -26,7 +26,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: 502-coder/docker/coder
file: 502-coder/docker/coder/Dockerfile.base
file: 502-coder/docker/coder/base.Dockerfile
push: true
tags: tuana9a/coder:base
cache-from: type=gha
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/502-docker-build-push-coder-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build-push-coder-go
on:
pull_request:
paths:
- "502-coder/docker/coder/Dockerfile.go"
- "502-coder/docker/coder/go.Dockerfile"

jobs:
build-and-push:
Expand All @@ -26,7 +26,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: 502-coder/docker/coder
file: 502-coder/docker/coder/Dockerfile.go
file: 502-coder/docker/coder/go.Dockerfile
push: true
tags: tuana9a/coder:go
cache-from: type=gha
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/502-docker-build-push-coder-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build-push-coder-java
on:
pull_request:
paths:
- "502-coder/docker/coder/Dockerfile.java"
- "502-coder/docker/coder/java.Dockerfile"

jobs:
build-and-push:
Expand All @@ -26,7 +26,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: 502-coder/docker/coder
file: 502-coder/docker/coder/Dockerfile.java
file: 502-coder/docker/coder/java.Dockerfile
push: true
tags: tuana9a/coder:java
cache-from: type=gha
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/502-docker-build-push-coder-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build-push-coder-nodejs
on:
pull_request:
paths:
- "502-coder/docker/coder/Dockerfile.nodejs"
- "502-coder/docker/coder/nodejs.Dockerfile"

jobs:
build-and-push:
Expand All @@ -26,7 +26,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: 502-coder/docker/coder
file: 502-coder/docker/coder/Dockerfile.nodejs
file: 502-coder/docker/coder/nodejs.Dockerfile
push: true
tags: tuana9a/coder:nodejs
cache-from: type=gha
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/502-docker-build-push-coder-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build-push-coder-terraform
on:
pull_request:
paths:
- "502-coder/docker/coder/Dockerfile.terraform"
- "502-coder/docker/coder/terraform.Dockerfile"

jobs:
build-and-push:
Expand All @@ -26,7 +26,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: 502-coder/docker/coder
file: 502-coder/docker/coder/Dockerfile.terraform
file: 502-coder/docker/coder/terraform.Dockerfile
push: true
tags: tuana9a/coder:terraform
cache-from: type=gha
Expand Down
7 changes: 0 additions & 7 deletions 502-coder/docker/coder/Dockerfile.base

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ USER coder

RUN sudo apt update -y

RUN sudo apt install -y tmux direnv jq net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder
RUN sudo apt install -y tmux direnv jq dnsutils net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder

# kubectl
RUN sudo curl -sL "https://dl.k8s.io/release/v1.28.11/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
Expand Down
7 changes: 7 additions & 0 deletions 502-coder/docker/coder/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM codercom/enterprise-base:ubuntu

USER coder

RUN sudo apt update -y

RUN sudo apt install -y tmux direnv jq dnsutils net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ USER coder

RUN sudo apt update -y

RUN sudo apt install -y tmux direnv jq net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder
RUN sudo apt install -y tmux direnv jq dnsutils net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder

RUN sudo wget -q https://go.dev/dl/go1.22.5.linux-amd64.tar.gz -O /opt/go1.22.5.linux-amd64.tar.gz \
&& sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf /opt/go1.22.5.linux-amd64.tar.gz \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

RUN sudo apt update -y

RUN sudo apt install -y tmux direnv jq net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder
RUN sudo apt install -y tmux direnv jq dnsutils net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder

# corretto 8
RUN sudo wget -q https://corretto.aws/downloads/latest/amazon-corretto-8-x64-linux-jdk.tar.gz -O /opt/corretto-8.tar.gz \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ USER coder

RUN sudo apt update -y

RUN sudo apt install -y tmux direnv jq net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder
RUN sudo apt install -y tmux direnv jq dnsutils net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder

# nodejs
RUN sudo wget -q https://nodejs.org/dist/v18.20.3/node-v18.20.3-linux-x64.tar.xz -O /opt/node-v18.20.3-linux-x64.tar.xz \
Expand Down
32 changes: 32 additions & 0 deletions 502-coder/docker/coder/terraform-eks-example.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM codercom/enterprise-base:ubuntu

USER coder

RUN sudo apt update -y

RUN sudo apt install -y tmux direnv jq dnsutils net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder

# awscli
RUN sudo wget -q https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -O /opt/awscli.zip \
&& sudo unzip -q /opt/awscli.zip -d /opt/ | sudo tee -a /opt/awscli.log \
&& sudo /opt/aws/install -u | sudo tee -a /opt/awscli.log

# terraform
RUN sudo wget -q https://releases.hashicorp.com/terraform/1.6.6/terraform_1.6.6_linux_amd64.zip -O /opt/terraform-1.6.6.zip \
&& sudo mkdir -p /opt/terraform-1.6.6/ && sudo unzip -q /opt/terraform-1.6.6.zip -d /opt/terraform-1.6.6/ \
&& sudo ln -sf /opt/terraform-1.6.6/terraform /usr/local/bin/terraform

RUN sudo wget -q https://releases.hashicorp.com/terraform/1.7.5/terraform_1.7.5_linux_amd64.zip -O /opt/terraform-1.7.5.zip \
&& sudo mkdir -p /opt/terraform-1.7.5/ && sudo unzip -q /opt/terraform-1.7.5.zip -d /opt/terraform-1.7.5/

RUN sudo wget -q https://releases.hashicorp.com/terraform/1.9.1/terraform_1.9.1_linux_amd64.zip -O /opt/terraform-1.9.1.zip \
&& sudo mkdir -p /opt/terraform-1.9.1/ && sudo unzip -q /opt/terraform-1.9.1.zip -d /opt/terraform-1.9.1/

# kubectl
RUN sudo curl -sL "https://dl.k8s.io/release/v1.28.11/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
&& sudo chmod 0755 /usr/local/bin/kubectl

# k9s
RUN sudo wget -q https://github.com/derailed/k9s/releases/download/v0.32.4/k9s_Linux_amd64.tar.gz -O /opt/k9s.tar.gz \
&& sudo mkdir -p /opt/k9s && sudo tar xzf /opt/k9s.tar.gz -C /opt/k9s \
&& sudo install -o root -g root -m 0755 /opt/k9s/k9s /usr/local/bin/k9s
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ USER coder

RUN sudo apt update -y

RUN sudo apt install -y tmux direnv jq net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder
RUN sudo apt install -y tmux direnv jq dnsutils net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder

# kubectl
RUN sudo curl -sL "https://dl.k8s.io/release/v1.28.11/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,8 @@ data "coder_parameter" "image" {
name = "tuana9a/coder:go"
value = "tuana9a/coder:go"
}
option {
name = "tuana9a/coder:terraform-eks-example"
value = "tuana9a/coder:terraform-eks-example"
}
}
4 changes: 4 additions & 0 deletions 502-coder/templates/kubernetes/coder_parameter.data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,8 @@ data "coder_parameter" "image" {
name = "tuana9a/coder:go"
value = "tuana9a/coder:go"
}
option {
name = "tuana9a/coder:terraform-eks-example"
value = "tuana9a/coder:terraform-eks-example"
}
}

0 comments on commit 820868e

Please sign in to comment.