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
from chalice import Chalice | |
import os | |
app = Chalice(app_name='pdftotext') | |
@app.route('/') | |
def index(): | |
# Get a sample pdf file | |
os.system("curl https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf -o /tmp/file.pdf") |
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
# Install two utilities to download and extract .rpm files | |
yum install yum-utils rpmdevtools | |
# Download .rpm files | |
yumdownloader <package_name> | |
# Extract files from .rpm | |
rpmdev-extract *.rpm |
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
# Open another terminal to find your running container id | |
docker ps | |
# CONTAINER ID IMAGE COMMAND... | |
#<CONTAINER ID> py36lambda "bash" ... | |
# Copy the files from container to local | |
docker cp <CONTAINER_ID>:/path/to/file/in/docker /path/to/local/directory |
NewerOlder