Skip to content

Commit

Permalink
fix(serverless): editing examole
Browse files Browse the repository at this point in the history
  • Loading branch information
homelessbirds committed May 24, 2024
1 parent b17922e commit 5a4153c
Showing 1 changed file with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,27 +104,20 @@ New Relic offers pre-built images that include our layer's different runtimes: J

### Example

Here is an example of the original Dockerfile merged with New Relic's prebuilt layer:
Here is an example of the original Dockerfile merged with New Relic's prebuilt layer. This example uses a Node.js runtime.

```dockerfile

# Define the New Relic pre-built image
FROM public.ecr.aws/newrelic-lambda-layers-for-docker/newrelic-lambda-layers-nodejs:20 AS layer

# Define the base image
# Define the base image:
FROM public.ecr.aws/lambda/nodejs:20

# Layer code
# Copy New Relic Layer code
COPY --from=layer /opt/ /opt/

# Copy the function code and package.json
COPY index.js package.json ./

# Install any additional dependencies
RUN npm install

# Set the CMD to your handler
CMD [ "index.handler" ]
# Rest of your Dockerfile...
```

</Step>
Expand Down

0 comments on commit 5a4153c

Please sign in to comment.