-
Notifications
You must be signed in to change notification settings - Fork 34
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 #985 from uselagoon/node-22
build: add Node.JS v22 images and tests
- Loading branch information
Showing
6 changed files
with
149 additions
and
1 deletion.
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
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,32 @@ | ||
ARG IMAGE_REPO | ||
FROM ${IMAGE_REPO:-lagoon}/node-22 | ||
|
||
LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" | ||
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images" | ||
|
||
ENV LAGOON=node | ||
|
||
RUN apk update \ | ||
&& apk add --no-cache \ | ||
libstdc++ \ | ||
&& apk add --no-cache \ | ||
bash \ | ||
binutils-gold \ | ||
ca-certificates \ | ||
curl \ | ||
file \ | ||
g++ \ | ||
gcc \ | ||
gcompat \ | ||
git \ | ||
gnupg \ | ||
libgcc \ | ||
libpng-dev \ | ||
linux-headers \ | ||
make \ | ||
openssl \ | ||
python3 \ | ||
wget \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
CMD ["/bin/docker-sleep"] |
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 IMAGE_REPO | ||
FROM ${IMAGE_REPO:-lagoon}/node-22 | ||
|
||
LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" | ||
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images" | ||
|
||
ENV LAGOON=node | ||
|
||
RUN apk update \ | ||
&& apk add --no-cache bash \ | ||
coreutils \ | ||
findutils \ | ||
git \ | ||
gzip \ | ||
mariadb-client \ | ||
mariadb-connector-c \ | ||
mongodb-tools \ | ||
openssh-client \ | ||
openssh-sftp-server \ | ||
patch \ | ||
postgresql-client \ | ||
procps \ | ||
rsync \ | ||
tar \ | ||
unzip \ | ||
&& rm -rf /var/cache/apk/* \ | ||
&& ln -s /usr/lib/ssh/sftp-server /usr/local/bin/sftp-server \ | ||
&& mkdir -p /home/.ssh \ | ||
&& fix-permissions /home/ | ||
|
||
# We not only use "export $PATH" as this could be overwritten again | ||
# like it happens in /etc/profile of alpine Images. | ||
COPY entrypoints /lagoon/entrypoints/ | ||
|
||
# Make sure shells are not running forever | ||
RUN echo "source /lagoon/entrypoints/80-shell-timeout.sh" >> /home/.bashrc | ||
|
||
# Copy mariadb-client configuration. | ||
COPY mariadb-client.cnf /etc/my.cnf.d/ | ||
RUN fix-permissions /etc/my.cnf.d/ | ||
|
||
# SSH Key and Agent Setup | ||
COPY ssh_config /etc/ssh/ssh_config | ||
COPY id_ed25519_lagoon_cli.key /home/.ssh/lagoon_cli.key | ||
RUN chmod 400 /home/.ssh/lagoon_cli.key | ||
ENV SSH_AUTH_SOCK=/tmp/ssh-agent | ||
|
||
ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] | ||
CMD ["/bin/docker-sleep"] |
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,45 @@ | ||
ARG IMAGE_REPO | ||
FROM ${IMAGE_REPO:-lagoon}/commons as commons | ||
FROM node:22.0-alpine3.19 | ||
|
||
LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" | ||
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images" | ||
|
||
ENV LAGOON=node | ||
|
||
ARG LAGOON_VERSION | ||
ENV LAGOON_VERSION=$LAGOON_VERSION | ||
|
||
# Copy commons files | ||
COPY --from=commons /lagoon /lagoon | ||
COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/wait-for /bin/ | ||
COPY --from=commons /sbin/tini /sbin/ | ||
COPY --from=commons /home /home | ||
|
||
RUN fix-permissions /etc/passwd \ | ||
&& mkdir -p /home \ | ||
&& fix-permissions /home \ | ||
&& mkdir -p /app \ | ||
&& fix-permissions /app | ||
|
||
ENV TMPDIR=/tmp \ | ||
TMP=/tmp \ | ||
HOME=/home \ | ||
# When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` | ||
ENV=/home/.bashrc \ | ||
# When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` | ||
BASH_ENV=/home/.bashrc | ||
|
||
# Make sure Bower and NPM are allowed to be running as root | ||
RUN echo '{ "allow_root": true }' > /home/.bowerrc \ | ||
&& echo 'unsafe-perm=true' > /home/.npmrc | ||
|
||
WORKDIR /app | ||
|
||
EXPOSE 3000 | ||
|
||
# tells the local development environment on which port we are running | ||
ENV LAGOON_LOCALDEV_HTTP_PORT=3000 | ||
|
||
ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] | ||
CMD ["yarn", "run", "start"] |