-
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.
Merge pull request #2 from terascope/smaller-docker-image
Add smaller base docker image without connectors
- Loading branch information
Showing
4 changed files
with
79 additions
and
9 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
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,49 @@ | ||
ARG NODE_VERSION | ||
FROM node:${NODE_VERSION}-alpine | ||
|
||
# use an older alpine registry for >=10.19 | ||
# because otherwise requiring node-rdkafka breaks | ||
# linux amd64 (like CI) | ||
RUN if [ -z "${NODE_VERSION%%10*}" ]; then \ | ||
sed -i -e 's/v3.11/v3.9/g' /etc/apk/repositories \ | ||
&& apk upgrade; \ | ||
fi | ||
|
||
RUN apk --no-cache add \ | ||
bash \ | ||
curl \ | ||
tini \ | ||
apk-tools \ | ||
build-base \ | ||
ca-certificates \ | ||
ncurses-terminfo \ | ||
libssh2-dev \ | ||
openssl-dev \ | ||
cyrus-sasl-dev \ | ||
python | ||
|
||
ENV NPM_CONFIG_LOGLEVEL error | ||
ENV WITH_SASL 0 | ||
|
||
RUN node --version | ||
RUN yarn --version | ||
RUN npm --version | ||
|
||
# Install bunyan | ||
RUN yarn global add \ | ||
--ignore-optional \ | ||
--no-progress \ | ||
--no-emoji \ | ||
--no-cache \ | ||
bunyan | ||
|
||
RUN mkdir -p /app/source | ||
WORKDIR /app/source | ||
|
||
COPY docker-pkg-fix.js /usr/local/bin/docker-pkg-fix | ||
COPY wait-for-it.sh /usr/local/bin/wait-for-it | ||
|
||
ENV NODE_OPTIONS "--max-old-space-size=2048" | ||
|
||
# Use tini to handle sigterm and zombie processes | ||
ENTRYPOINT ["/sbin/tini", "--"] |
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 |
---|---|---|
@@ -1,6 +1,15 @@ | ||
# base docker image | ||
# Terascope Base Docker images: | ||
|
||
These are the latest docker image tags: | ||
These are the latest docker image tags | ||
|
||
- `terascope/node-base:10.23.1` | ||
- `terascope/node-base:12.22.1` | ||
With the terafoundation connectors builtin: | ||
|
||
- `terascope/node-base:10.24.0` - 518MB | ||
- `terascope/node-base:12.21.0` - 525MB | ||
- `terascope/node-base:14.16.0` - 553MB | ||
|
||
Without: (this will save the image size by roughly 200MB) | ||
|
||
- `terascope/node-base:10.24.0-core` - 313MB | ||
- `terascope/node-base:12.21.0-core` - 308MB | ||
- `terascope/node-base:14.16.0-core` - 336MB |
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