forked from aws/aws-cdk
-
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.
feat(ecr-assets): custom docker files (aws#5652)
* support custom docker files * revert tsconfig changes * doc strings modification according to conventions
- Loading branch information
1 parent
3b5959f
commit 1b25a4b
Showing
10 changed files
with
156 additions
and
4 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
5 changes: 5 additions & 0 deletions
5
packages/@aws-cdk/aws-ecr-assets/test/demo-image-custom-docker-file/Dockerfile.Custom
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM python:3.6 | ||
EXPOSE 8000 | ||
WORKDIR /src | ||
ADD . /src | ||
CMD python3 index.py |
33 changes: 33 additions & 0 deletions
33
packages/@aws-cdk/aws-ecr-assets/test/demo-image-custom-docker-file/index.py
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/python | ||
import sys | ||
import textwrap | ||
import http.server | ||
import socketserver | ||
|
||
PORT = 8000 | ||
|
||
|
||
class Handler(http.server.SimpleHTTPRequestHandler): | ||
def do_GET(self): | ||
self.send_response(200) | ||
self.send_header('Content-Type', 'text/html') | ||
self.end_headers() | ||
self.wfile.write(textwrap.dedent('''\ | ||
<!doctype html> | ||
<html><head><title>It works</title></head> | ||
<body> | ||
<h1>Hello from the integ test container</h1> | ||
<p>This container got built and started as part of the integ test.</p> | ||
<img src="https://media.giphy.com/media/nFjDu1LjEADh6/giphy.gif"> | ||
</body> | ||
''').encode('utf-8')) | ||
|
||
|
||
def main(): | ||
httpd = http.server.HTTPServer(("", PORT), Handler) | ||
print("serving at port", PORT) | ||
httpd.serve_forever() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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
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
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
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