Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/template/docker-compose-deploy
Submodule docker-compose-deploy added at 203a14
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
[submodule ".github/template/terraform-prepare"]
path = .github/template/terraform-prepare
url = git@github.com:acrois/terraform-prepare
[submodule ".github/template/docker-compose-deploy"]
path = .github/template/docker-compose-deploy
url = git@github.com:acrois/docker-compose-deploy
17 changes: 17 additions & 0 deletions .ssh/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Host gcp-*
ProxyCommand gcloud compute start-iap-tunnel $(cut -c 4- <<< "%h") %p --listen-on-stdin --verbosity=warning
StrictHostKeyChecking no

Host aws-*
ProxyCommand aws ssm start-session --target $(cut -c 4- <<< "%h") --document-name AWS-StartSSHSession --parameters portNumber=%p
StrictHostKeyChecking no

Host i-* mi-*
ProxyCommand aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters portNumber=%p
StrictHostKeyChecking no

Host * *
ControlMaster auto
ControlPersist 900
# Alternative: /tmp/%r@%h-%p
ControlPath /tmp/u-%i-ssh-%C
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RUN \
tar \
coreutils \
python3 \
openssh \
&& apk add \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
git-filter-repo \
Expand All @@ -24,6 +25,9 @@ ENTRYPOINT [ "/entrypoint.sh" ]
WORKDIR /etc/skel/
RUN echo -e "\nsource ~/scripts/config/.profile\n" >> .profile

WORKDIR /etc/skel/.ssh/
COPY .ssh .

WORKDIR /etc/skel/scripts/
COPY config.sh .
COPY config ./config
Expand Down
14 changes: 11 additions & 3 deletions config.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#/usr/bin/env sh
echo -e "\nsource $HOME/scripts/config/.profile\n" >> ~/.profile
source ~/.profile
#!/usr/bin/env sh

DEST="$HOME/.profile"

if [ -f "$HOME/.bash_profile" ]; then
DEST="$HOME/.bash_profile";
fi

# echo $DEST;
echo "\nsource $HOME/scripts/config/.profile\n" >> $DEST;
source $DEST;