-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
duplicateThis issue is a duplicate.This issue is a duplicate.feature-requestA feature should be added or improved.A feature should be added or improved.
Description
I have a docker file like this.
#We want latest NODE alpine so we are as light weight as possible.
FROM node:current-alpine3.12
#Inside the container file system move to this linux directory. Standard for applications.
WORKDIR /var/task
#This will copy everything in the host machines current working directory into the working directory we changed into in the last step.
#The catch here is that we are ignoring files in the .dockerignore file. We want only the files we need for the skinniest image possible.
COPY . .
#Install C++ stuff for the AWS MQTT dependency.
RUN apk add cmake
RUN apk add libssl-dev
#Install NPM while building this image
RUN yarn upgrade
#We want to serve our server so serve it with this serve command.
CMD ["node", "server.js"]
This fails with
Step 5/10 : RUN apk add libssl-dev
---> Running in eb1041a7c386
ERROR: unsatisfiable constraints:
libssl-dev (missing):
required by: world[libssl-dev]I found online that I should use libressl-dev with Node Alpine
Modified Docker file and everything build but the aws-crt dependency now throws this:
Services_1 | Starting child process with 'node server.js'
Services_1 | node:internal/modules/cjs/loader:1167
Services_1 | return process.dlopen(module, path.toNamespacedPath(filename));
Services_1 | ^
Services_1 |
Services_1 | Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /var/task/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node)
Services_1 | at Object.Module._extensions..node (node:internal/modules/cjs/loader:1167:18)
Services_1 | at Module.load (node:internal/modules/cjs/loader:973:32)
Services_1 | at Function.Module._load (node:internal/modules/cjs/loader:813:14)
Services_1 | at Module.require (node:internal/modules/cjs/loader:997:19)
Services_1 | at require (node:internal/modules/cjs/helpers:92:18)
Services_1 | at Object.<anonymous> (/var/task/node_modules/aws-crt/dist/native/binding.js:55:19)
Services_1 | at Module._compile (node:internal/modules/cjs/loader:1108:14)
Services_1 | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
Services_1 | at Module.load (node:internal/modules/cjs/loader:973:32)
Services_1 | at Function.Module._load (node:internal/modules/cjs/loader:813:14) {
Services_1 | code: 'ERR_DLOPEN_FAILED'
Services_1 | }
Services_1 | Program node server.js exited with code 1Seems Node Alpine is not the right choice? Why not, its the most common Node base image. amd64 is what most ECS Tasks run on? Can you provide instructions?
Metadata
Metadata
Assignees
Labels
duplicateThis issue is a duplicate.This issue is a duplicate.feature-requestA feature should be added or improved.A feature should be added or improved.