forked from philips-labs/terraform-aws-github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(examples): Upgrading ubuntu example to 22.04 (philips-labs#2250)
* fix(examples): adding iptables to ubuntu example * fix(examples): adding export to .profile * chore: bump ubuntu example to latest LTS, 22.04 philips-labs#2103
- Loading branch information
1 parent
9f7d32d
commit d4b7650
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,14 @@ ${pre_install} | |
apt-get update | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
awscli \ | ||
jq \ | ||
build-essential \ | ||
curl \ | ||
wget \ | ||
git \ | ||
iptables \ | ||
jq \ | ||
uidmap \ | ||
build-essential \ | ||
unzip | ||
unzip \ | ||
wget | ||
|
||
user_name=ubuntu | ||
user_id=$(id -ru $user_name) | ||
|
@@ -43,16 +44,16 @@ WantedBy=default.target | |
EOF | ||
|
||
echo export XDG_RUNTIME_DIR=/run/user/$user_id >>/home/$user_name/.profile | ||
echo export XDG_RUNTIME_DIR=/run/user/$user_id >>/home/$user_name/.bashrc | ||
|
||
systemctl daemon-reload | ||
systemctl enable [email protected] | ||
systemctl start [email protected] | ||
|
||
curl -fsSL https://get.docker.com/rootless >>/opt/rootless.sh && chmod 755 /opt/rootless.sh | ||
su -l $user_name -c /opt/rootless.sh | ||
echo export DOCKER_HOST=unix:///run/user/$user_id/docker.sock >>/home/$user_name/.profile | ||
echo export PATH=/home/$user_name/bin:$PATH >>/home/$user_name/.profile | ||
echo export DOCKER_HOST=unix:///run/user/$user_id/docker.sock >>/home/$user_name/.bashrc | ||
echo export PATH=/home/$user_name/bin:$PATH >>/home/$user_name/.bashrc | ||
|
||
# Run docker service by default | ||
loginctl enable-linger $user_name | ||
|