Skip to content

Commit 769dcf9

Browse files
committed
Fix sudo in gcloud-slim
1 parent 5cb932d commit 769dcf9

4 files changed

Lines changed: 36 additions & 12 deletions

File tree

.config/ghostty/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
macos-non-native-fullscreen = true
22
# background-opacity = 0.8
33
unfocused-split-opacity = 1
4+
term = xterm-256color
45
keybind = global:cmd+ctrl+t=toggle_quick_terminal
5-
term = xterm-256color

.docker/gcloud-slim

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,28 @@ ENV DEBIAN_FRONTEND=noninteractive
33
ARG SOPS_VERSION="v3.8.1"
44
ARG SUPABASE_VERSION="2.26.8"
55
ARG USERNAME=jgmize
6+
ARG TARGETARCH
7+
SHELL ["/bin/bash", "-c"]
68
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash && \
79
apt-get install -y --no-install-recommends \
810
build-essential ca-certificates curl emacs-nox git gpg gpg-agent htop jq \
911
kubectl libsqlite3-0 microsocks openssh-server pandoc postgresql-client python3-epc \
1012
python3-importmagic ripgrep software-properties-common sudo tmate tmux tree \
1113
tzdata unzip && apt-get clean -y && \
1214
rm -rf /var/cache/debconf/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
13-
RUN curl -LO https://github.com/supabase/cli/releases/download/v${SUPABASE_VERSION}/supabase_${SUPABASE_VERSION}_linux_amd64.deb && \
14-
dpkg -i supabase_${SUPABASE_VERSION}_linux_amd64.deb
15+
RUN curl -LO https://github.com/supabase/cli/releases/download/v${SUPABASE_VERSION}/supabase_${SUPABASE_VERSION}_linux_${TARGETARCH}.deb && \
16+
dpkg -i supabase_${SUPABASE_VERSION}_linux_${TARGETARCH}.deb
1517
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && \
1618
chmod +x get_helm.sh && ./get_helm.sh
17-
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
19+
RUN declare -A arch=(["amd64"]="x86_64" ["arm64"]="aarch64") && \
20+
curl "https://awscli.amazonaws.com/awscli-exe-linux-${arch[$TARGETARCH]}.zip" -o "awscliv2.zip" && \
1821
unzip awscliv2.zip && ./aws/install && rm -rf awscliv2.zip aws
19-
RUN curl -L "https://github.com/getsops/sops/releases/download/${SOPS_VERSION}/sops-${SOPS_VERSION}.linux.amd64" \
22+
RUN curl -L "https://github.com/getsops/sops/releases/download/${SOPS_VERSION}/sops-${SOPS_VERSION}.linux.$TARGETARCH" \
2023
-o /usr/local/bin/sops && chmod +x /usr/local/bin/sops
21-
RUN curl -L https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 \
24+
RUN curl -L https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_$TARGETARCH \
2225
-o /usr/local/bin/yq && chmod +x /usr/local/bin/yq
2326
RUN curl -s https://yamlscript.org/install | BIN=1 bash
24-
RUN useradd -m -s /usr/bin/bash -G sudo ${USERNAME}
27+
RUN useradd -m -s /usr/bin/bash -G sudo ${USERNAME} && echo "%sudo ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/sudo
2528
WORKDIR /home/${USERNAME}
2629
USER ${USERNAME}
2730
COPY . ./dotfiles

.lima/.org

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,23 @@
1111
** clone
1212

1313
- [[https://github.com/lima-vm/lima][github.com/lima-vm/lima]]
14-
14+
1515
#+begin_src sh
1616
cd ~/src
1717
git clone https://github.com/lima-vm/lima
1818
#+end_src
19-
19+
2020
- [[~/src/lima]]
21+
22+
** template
23+
24+
- [ ] [[file+emacs:~/dotfiles/.lima/template.ys][template.ys]]
25+
26+
#+begin_src bash
27+
ys -J template.ys | yq -Poy > k8s.yaml
28+
limactl start ./k8s.yaml
29+
#+end_src
30+
- initial version is a minor refactor of the k8s template from
31+
[[~/src/lima/templates/k8s.yaml]] based on debian-13 instead of ubuntu
32+
with the inline shell scripts refactored into separate files
33+
- [ ] multi-node version with bridge mode, calico, & wireguard

.org

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- [[https://gitlab.com/jgmize/dotfiles/-/merge_requests?scope=all&state=all][Gitlab merge requests]]
2121
- [[https://github.com/jgmize/dotfiles/pulls?q=][Github pull requests]]
2222

23-
** TODO
23+
** DONE
2424

2525
- [X] add cloud CLIs
2626
- [X] aws
@@ -30,13 +30,21 @@
3030
#+begin_src sh
3131
docker pull ghcr.io/jgmize/dotfiles:gcloud-slim
3232
#+end_src
33-
- [ ] add ys
33+
- [X] add ys
3434
- [[https://yamlscript.org/doc/install/][Installing YS - YS — YAML Done Wisely]]
35+
- [X] add multiplatform image
36+
image: jgmize/dotfiles
37+
tags: multiplatform, latest
38+
39+
** TODO
40+
3541
- [ ] add sts
3642
#+begin_src yaml
37-
image: ghcr.io/jgmize/dotfiles:gcloud-slim
43+
#image: ghcr.io/jgmize/dotfiles:gcloud-slim
44+
image: jgmize/dotfiles
3845
command:
3946
- sleep
4047
- infinity
4148
volumeMounts: TODO
4249
#+end_src
50+
- [ ] fix sudo in gcloud-slim dockerfile

0 commit comments

Comments
 (0)