Skip to content

Instantly share code, notes, and snippets.

@mtrunkat
Forked from jancurn/Dockerfile
Last active July 26, 2021 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mtrunkat/7e14a4b8790108c986a2aa999a9cedbf to your computer and use it in GitHub Desktop.
Save mtrunkat/7e14a4b8790108c986a2aa999a9cedbf to your computer and use it in GitHub Desktop.
WARNING for future me: Do not ever delete this thing! It's used in integration tests.

Do not modify following line as it's used in tests:

This is an Apify actor that is stored as GitHub Gist and used in integration tests.

const Apify = require('apify');
Apify.main(async () => {
// This is to test log...
console.log('Hello from Gist thru Log!');
// This is to test output...
await Apify.setValue('OUTPUT', {
message: 'Hello from Gist thru output!'
});
});
# Here you choose the base Docker image for the actor. Apify provides the following images:
# apify/actor-node-basic
# apify/actor-node-chrome
# apify/actor-node-puppeteer
# However, you can use any other image from Docker Hub.
# For more information, see https://apify.com/docs/actor#base-images
FROM apify/actor-node-basic
# Copy all files and directories from the directory to the Docker image
COPY . ./
# Install NPM packages, skip optional and development dependencies to keep the image small,
# avoid logging to much and show log the dependency tree
RUN npm install --quiet --only=prod --no-optional \
&& npm list
{
"name": "actor-in-gist-example",
"version": "0.0.1",
"private": true,
"dependencies": {
"apify": "^0.11.8"
},
"scripts": {
"start": "node actor-in-gist-example.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment