Skip to content

Commit

Permalink
feat: Docker compose CLI plugin and newer versions (CloudSnorkel#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
kichik authored Sep 16, 2022
1 parent ac65c11 commit 2ba51b3
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
echo FROM public.ecr.aws/docker/library/bash > Dockerfile
docker build .
docker-compose --version
docker compose version
self-hosted-windows:
strategy:
Expand Down Expand Up @@ -123,3 +124,4 @@ jobs:
echo FROM public.ecr.aws/docker/library/bash > Dockerfile
docker build .
docker-compose --version
docker compose version
5 changes: 3 additions & 2 deletions src/providers/docker-images/codebuild/linux-arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ RUN if [ "$RUNNER_VERSION" = "latest" ]; then RUNNER_VERSION=`curl -w "%{redire
# docker-in-docker
ARG DOCKER_CHANNEL="stable"
ARG DIND_COMMIT="42b1175eda071c0e9121e1d64345928384a93df1"
ARG DOCKER_VERSION="20.10.16"
ARG DOCKER_COMPOSE_VERSION="2.5.1"
ARG DOCKER_VERSION="20.10.18"
ARG DOCKER_COMPOSE_VERSION="2.11.0"

RUN curl -fsSL "https://download.docker.com/linux/static/${DOCKER_CHANNEL}/aarch64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz && \
tar --strip-components 1 -C /usr/local/bin/ -xzf docker.tgz && \
Expand All @@ -54,6 +54,7 @@ RUN curl -fsSL "https://download.docker.com/linux/static/${DOCKER_CHANNEL}/aarch
echo 'dockremap:165536:65536' >> /etc/subgid && \
curl -fsSL "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -o /usr/local/bin/dind && \
curl -fsSL https://github.com/docker/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-linux-aarch64 -o /usr/local/bin/docker-compose && \
mkdir -p /home/runner/.docker/cli-plugins && ln -s /usr/local/bin/docker-compose /home/runner/.docker/cli-plugins/docker-compose && \
chmod +x /usr/local/bin/dind /usr/local/bin/docker-compose && \
addgroup docker && usermod -aG docker runner

Expand Down
5 changes: 3 additions & 2 deletions src/providers/docker-images/codebuild/linux-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ RUN if [ "${RUNNER_VERSION}" = "latest" ]; then RUNNER_VERSION=`curl -w "%{redi
# docker-in-docker
ARG DOCKER_CHANNEL="stable"
ARG DIND_COMMIT="42b1175eda071c0e9121e1d64345928384a93df1"
ARG DOCKER_VERSION="20.10.16"
ARG DOCKER_COMPOSE_VERSION="2.5.1"
ARG DOCKER_VERSION="20.10.18"
ARG DOCKER_COMPOSE_VERSION="2.11.0"

RUN curl -fsSL "https://download.docker.com/linux/static/${DOCKER_CHANNEL}/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz && \
tar --strip-components 1 -C /usr/local/bin/ -xzf docker.tgz && \
Expand All @@ -54,6 +54,7 @@ RUN curl -fsSL "https://download.docker.com/linux/static/${DOCKER_CHANNEL}/x86_6
echo 'dockremap:165536:65536' >> /etc/subgid && \
curl -fsSL "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -o /usr/local/bin/dind && \
curl -fsSL https://github.com/docker/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose && \
mkdir -p /home/runner/.docker/cli-plugins && ln -s /usr/local/bin/docker-compose /home/runner/.docker/cli-plugins/docker-compose && \
chmod +x /usr/local/bin/dind /usr/local/bin/docker-compose && \
addgroup docker && usermod -aG docker runner

Expand Down
16 changes: 8 additions & 8 deletions test/default.integ.snapshot/github-runners-test.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
}
}
},
"fe710895fc78c6ee320929ed6260a21ff4938541ecc882b95d0a504a09ac105a": {
"d20a87e7cec6ea025a5602e96fdf307c92c932f5c81ea4bb30e4bf776571b14f": {
"source": {
"path": "asset.fe710895fc78c6ee320929ed6260a21ff4938541ecc882b95d0a504a09ac105a",
"path": "asset.d20a87e7cec6ea025a5602e96fdf307c92c932f5c81ea4bb30e4bf776571b14f",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "fe710895fc78c6ee320929ed6260a21ff4938541ecc882b95d0a504a09ac105a.zip",
"objectKey": "d20a87e7cec6ea025a5602e96fdf307c92c932f5c81ea4bb30e4bf776571b14f.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand All @@ -92,15 +92,15 @@
}
}
},
"ff60a42c91c0f8214eaa25030c3a2857ecd5d20434e145d39c3909e3fffcfa34": {
"efce5fb44c85cf97726c245713194db670d5332d3927da6dedd21ba1b5f8f800": {
"source": {
"path": "asset.ff60a42c91c0f8214eaa25030c3a2857ecd5d20434e145d39c3909e3fffcfa34",
"path": "asset.efce5fb44c85cf97726c245713194db670d5332d3927da6dedd21ba1b5f8f800",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "ff60a42c91c0f8214eaa25030c3a2857ecd5d20434e145d39c3909e3fffcfa34.zip",
"objectKey": "efce5fb44c85cf97726c245713194db670d5332d3927da6dedd21ba1b5f8f800.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down Expand Up @@ -209,15 +209,15 @@
}
}
},
"281fea18609a1af0cc35f88caf7c5208faeffc506b1c05c52d8c4ebcd9c00b72": {
"c53d0139488bcb1a3c057fa9dbffcf70dbeab3f2a1f50f7ee5056421917eb0b3": {
"source": {
"path": "github-runners-test.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "281fea18609a1af0cc35f88caf7c5208faeffc506b1c05c52d8c4ebcd9c00b72.json",
"objectKey": "c53d0139488bcb1a3c057fa9dbffcf70dbeab3f2a1f50f7ee5056421917eb0b3.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
12 changes: 6 additions & 6 deletions test/default.integ.snapshot/github-runners-test.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/fe710895fc78c6ee320929ed6260a21ff4938541ecc882b95d0a504a09ac105a.zip"
"/d20a87e7cec6ea025a5602e96fdf307c92c932f5c81ea4bb30e4bf776571b14f.zip"
]
]
}
Expand Down Expand Up @@ -2884,7 +2884,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/fe710895fc78c6ee320929ed6260a21ff4938541ecc882b95d0a504a09ac105a.zip"
"/d20a87e7cec6ea025a5602e96fdf307c92c932f5c81ea4bb30e4bf776571b14f.zip"
]
]
},
Expand Down Expand Up @@ -3003,7 +3003,7 @@
"ProjectName": {
"Ref": "CodeBuildImageBuilderCodeBuild38ECAA44"
},
"BuildHash": "103b2f743625d7f99a8c0f8bcc701ed3"
"BuildHash": "a59defeb5a5e4ca2326fa31351e3627d"
},
"DependsOn": [
"buildimagedcc036c8876b451ea2c1552f9e06e9e1LogRetention13129CEB",
Expand Down Expand Up @@ -3461,7 +3461,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/ff60a42c91c0f8214eaa25030c3a2857ecd5d20434e145d39c3909e3fffcfa34.zip"
"/efce5fb44c85cf97726c245713194db670d5332d3927da6dedd21ba1b5f8f800.zip"
]
]
}
Expand Down Expand Up @@ -3708,7 +3708,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/ff60a42c91c0f8214eaa25030c3a2857ecd5d20434e145d39c3909e3fffcfa34.zip"
"/efce5fb44c85cf97726c245713194db670d5332d3927da6dedd21ba1b5f8f800.zip"
]
]
},
Expand Down Expand Up @@ -3827,7 +3827,7 @@
"ProjectName": {
"Ref": "CodeBuildImageBuilderarmCodeBuildBFF1CF57"
},
"BuildHash": "f6900d4af688c7e21926ac8d97b0cdf7"
"BuildHash": "31a232ee8ab6033256b6e0b7d39259a1"
},
"DependsOn": [
"buildimagedcc036c8876b451ea2c1552f9e06e9e1LogRetention13129CEB",
Expand Down
2 changes: 1 addition & 1 deletion test/default.integ.snapshot/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/281fea18609a1af0cc35f88caf7c5208faeffc506b1c05c52d8c4ebcd9c00b72.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c53d0139488bcb1a3c057fa9dbffcf70dbeab3f2a1f50f7ee5056421917eb0b3.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
8 changes: 4 additions & 4 deletions test/default.integ.snapshot/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -3691,7 +3691,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/fe710895fc78c6ee320929ed6260a21ff4938541ecc882b95d0a504a09ac105a.zip"
"/d20a87e7cec6ea025a5602e96fdf307c92c932f5c81ea4bb30e4bf776571b14f.zip"
]
]
}
Expand Down Expand Up @@ -3894,7 +3894,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/fe710895fc78c6ee320929ed6260a21ff4938541ecc882b95d0a504a09ac105a.zip"
"/d20a87e7cec6ea025a5602e96fdf307c92c932f5c81ea4bb30e4bf776571b14f.zip"
]
]
},
Expand Down Expand Up @@ -4854,7 +4854,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/ff60a42c91c0f8214eaa25030c3a2857ecd5d20434e145d39c3909e3fffcfa34.zip"
"/efce5fb44c85cf97726c245713194db670d5332d3927da6dedd21ba1b5f8f800.zip"
]
]
}
Expand Down Expand Up @@ -5057,7 +5057,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/ff60a42c91c0f8214eaa25030c3a2857ecd5d20434e145d39c3909e3fffcfa34.zip"
"/efce5fb44c85cf97726c245713194db670d5332d3927da6dedd21ba1b5f8f800.zip"
]
]
},
Expand Down

0 comments on commit 2ba51b3

Please sign in to comment.