Skip to content

Commit eeb7256

Browse files
Merge pull request #3 from theohbrothers/refactor/ci-remove-need-for-dockerfile.header.ps1-and-dockerfile.footer.ps1-templates
Refactor (ci): Remove need for `Dockerfile.header.ps1` and `Dockerfile.footer.ps1` templates
2 parents 1a11e1a + a5273cc commit eeb7256

File tree

24 files changed

+42
-83
lines changed

24 files changed

+42
-83
lines changed

generate/definitions/VARIANTS.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ $VARIANTS_SHARED = @{
5151
templates = @{
5252
'Dockerfile' = @{
5353
common = $true
54-
includeHeader = $true
55-
includeFooter = $true
5654
passes = @(
5755
@{
5856
variables = @{}

generate/templates/Dockerfile.footer.ps1

Lines changed: 0 additions & 12 deletions
This file was deleted.

generate/templates/Dockerfile.header.ps1

Lines changed: 0 additions & 5 deletions
This file was deleted.

generate/templates/Dockerfile.ps1

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
@"
2-
$(
3-
($VARIANT['_metadata']['components'] | % {
2+
FROM $( $VARIANT['_metadata']['distro'] ):$( $VARIANT['_metadata']['distro_version'] )
3+
4+
RUN apk add --no-cache curl wget
5+
6+
7+
"@
8+
9+
$VARIANT['_metadata']['components'] | % {
410
$component = $_
511

612
switch( $component ) {
@@ -25,6 +31,18 @@ RUN apk add --no-cache openssl
2531
throw "No such component: $component"
2632
}
2733
}
28-
}) -join ''
29-
)
34+
}
35+
36+
@"
37+
# This is the only signal from the docker host that appears to stop crond
38+
STOPSIGNAL SIGKILL
39+
40+
COPY docker-entrypoint.sh /docker-entrypoint.sh
41+
RUN chmod +x /docker-entrypoint.sh
42+
43+
VOLUME ["/cronscripts"]
44+
45+
ENTRYPOINT ["/docker-entrypoint.sh"]
46+
CMD ["crond", "-f"]
47+
3048
"@

variants/3.10-mysqlclient-openssl/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ RUN apk add --no-cache mysql-client
66

77
RUN apk add --no-cache openssl
88

9-
10-
119
# This is the only signal from the docker host that appears to stop crond
1210
STOPSIGNAL SIGKILL
1311

@@ -17,4 +15,4 @@ RUN chmod +x /docker-entrypoint.sh
1715
VOLUME ["/cronscripts"]
1816

1917
ENTRYPOINT ["/docker-entrypoint.sh"]
20-
CMD ["crond", "-f"]
18+
CMD ["crond", "-f"]

variants/3.10-mysqlclient/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ RUN apk add --no-cache curl wget
44

55
RUN apk add --no-cache mysql-client
66

7-
8-
97
# This is the only signal from the docker host that appears to stop crond
108
STOPSIGNAL SIGKILL
119

@@ -15,4 +13,4 @@ RUN chmod +x /docker-entrypoint.sh
1513
VOLUME ["/cronscripts"]
1614

1715
ENTRYPOINT ["/docker-entrypoint.sh"]
18-
CMD ["crond", "-f"]
16+
CMD ["crond", "-f"]

variants/3.10-openssl/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ RUN apk add --no-cache curl wget
44

55
RUN apk add --no-cache openssl
66

7-
8-
97
# This is the only signal from the docker host that appears to stop crond
108
STOPSIGNAL SIGKILL
119

@@ -15,4 +13,4 @@ RUN chmod +x /docker-entrypoint.sh
1513
VOLUME ["/cronscripts"]
1614

1715
ENTRYPOINT ["/docker-entrypoint.sh"]
18-
CMD ["crond", "-f"]
16+
CMD ["crond", "-f"]

variants/3.10/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ FROM alpine:3.10
22

33
RUN apk add --no-cache curl wget
44

5-
6-
75
# This is the only signal from the docker host that appears to stop crond
86
STOPSIGNAL SIGKILL
97

@@ -13,4 +11,4 @@ RUN chmod +x /docker-entrypoint.sh
1311
VOLUME ["/cronscripts"]
1412

1513
ENTRYPOINT ["/docker-entrypoint.sh"]
16-
CMD ["crond", "-f"]
14+
CMD ["crond", "-f"]

variants/3.11-mysqlclient-openssl/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ RUN apk add --no-cache mysql-client
66

77
RUN apk add --no-cache openssl
88

9-
10-
119
# This is the only signal from the docker host that appears to stop crond
1210
STOPSIGNAL SIGKILL
1311

@@ -17,4 +15,4 @@ RUN chmod +x /docker-entrypoint.sh
1715
VOLUME ["/cronscripts"]
1816

1917
ENTRYPOINT ["/docker-entrypoint.sh"]
20-
CMD ["crond", "-f"]
18+
CMD ["crond", "-f"]

variants/3.11-mysqlclient/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ RUN apk add --no-cache curl wget
44

55
RUN apk add --no-cache mysql-client
66

7-
8-
97
# This is the only signal from the docker host that appears to stop crond
108
STOPSIGNAL SIGKILL
119

@@ -15,4 +13,4 @@ RUN chmod +x /docker-entrypoint.sh
1513
VOLUME ["/cronscripts"]
1614

1715
ENTRYPOINT ["/docker-entrypoint.sh"]
18-
CMD ["crond", "-f"]
16+
CMD ["crond", "-f"]

0 commit comments

Comments
 (0)