Skip to content

Commit

Permalink
Fix mounting instancestore
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon committed Jun 20, 2024
1 parent 3ff56af commit 7fe6719
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hello-cdk/lib/hello-cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ export class HelloCdkStack extends cdk.Stack {

const userData = ec2.UserData.forLinux();
userData.addCommands(
"#!/bin/bash",
"volume_name=`lsblk -x SIZE -o NAME | tail -n 1`",
"mkfs -t ext4 /dev/$volume_name",
"mkdir /docker",
"mount /dev/$volume_name /docker",
"echo '{\"data-root\": \"/docker\"}' > /etc/docker/daemon.json",
"systemctl restart docker --no-block"
"systemctl restart docker"
);

const multipartUserData = new ec2.MultipartUserData();
Expand Down

0 comments on commit 7fe6719

Please sign in to comment.