Node.js¶
The corresponding FreeBSD14.3p5-amd64 images are available on Github, DockerHub and Quay. CI/CD pipelines will soon add amd64/aarch64 support for 15.0, 14.snap, 15.snap and 16.snap.
- Upstream repo: https://github.com/nodejs/docker-node
- FreeBSD fork: https://github.com/matias-pizarro/docker-node
images/14.3/node/24/Containerfile
FROM ghcr.io/matias-pizarro/freebsd-oci-containers/freebsd-zfs:14.3
RUN echo "node:1000:::0:0:Node user:/home/node:/usr/local/bin/bash:" | adduser -f -
ENV NODE_VERSION=24.10.0
RUN /usr/bin/env pkg install -yr FreeBSD-ports www/node24 \
www/npm-node24 \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
# smoke tests
&& node --version \
&& npm --version \
&& rm -f /var/cache/pkg/* \
&& rm -rf /var/db/pkg/*
ENV YARN_VERSION=1.22.19
RUN /usr/bin/env pkg install -yr FreeBSD-ports www/yarn-node24 \
# smoke test
&& yarn --version \
&& rm -f /var/cache/pkg/* \
&& rm -rf /var/db/pkg/*
COPY --chmod=755 docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD [ "node" ]
podman build \
--env IGNORE_OSVERSION=yes \
--env ABI=FreeBSD:14:$(sysctl -n hw.machine_arch) \
--env OSVERSION=1403000 \
--env VERSION_MINOR=3 \
--no-hosts \
--tag node:24-freebsd \
--tag node:24-freebsd14 \
--tag node:24-freebsd14.3 \
--tag node:freebsd \
--tag node:freebsd14 \
--tag node:freebsd14.3 \
--file Containerfile
# Github
echo
echo "################################################################################"
IMAGE_PATH="ghcr.io/matias-pizarro/freebsd-oci-containers"
echo "Pushing node-24 to ${IMAGE_PATH}"
echo
echo "node:24-freebsd"
podman tag localhost/node:24-freebsd "${IMAGE_PATH}"/node:24-freebsd
podman push "${IMAGE_PATH}"/node:24-freebsd
echo
echo "node:24-freebsd14"
podman tag localhost/node:24-freebsd14 "${IMAGE_PATH}"/node:24-freebsd14
podman push "${IMAGE_PATH}"/node:24-freebsd14
echo
echo "node:24-freebsd14.3"
podman tag localhost/node:24-freebsd14.3 "${IMAGE_PATH}"/node:24-freebsd14.3
podman push "${IMAGE_PATH}"/node:24-freebsd14.3
echo
echo "node:freebsd"
podman tag localhost/node:freebsd "${IMAGE_PATH}"/node:freebsd
podman push "${IMAGE_PATH}"/node:freebsd
echo
echo "node:freebsd14"
podman tag localhost/node:freebsd14 "${IMAGE_PATH}"/node:freebsd14
podman push "${IMAGE_PATH}"/node:freebsd14
echo
echo "node:freebsd14.3"
podman tag localhost/node:freebsd14.3 "${IMAGE_PATH}"/node:freebsd14.3
podman push "${IMAGE_PATH}"/node:freebsd14.3
# Docker
echo
echo "################################################################################"
IMAGE_PATH="docker.io/matiaspizarro"
echo "Pushing node-24 to ${IMAGE_PATH}"
echo
echo "node:24-freebsd"
podman tag localhost/node:24-freebsd "${IMAGE_PATH}"/node:24-freebsd
podman push "${IMAGE_PATH}"/node:24-freebsd
echo
echo "node:24-freebsd14"
podman tag localhost/node:24-freebsd14 "${IMAGE_PATH}"/node:24-freebsd14
podman push "${IMAGE_PATH}"/node:24-freebsd14
echo
echo "node:24-freebsd14.3"
podman tag localhost/node:24-freebsd14.3 "${IMAGE_PATH}"/node:24-freebsd14.3
podman push "${IMAGE_PATH}"/node:24-freebsd14.3
echo
echo "node:freebsd"
podman tag localhost/node:freebsd "${IMAGE_PATH}"/node:freebsd
podman push "${IMAGE_PATH}"/node:freebsd
echo
echo "node:freebsd14"
podman tag localhost/node:freebsd14 "${IMAGE_PATH}"/node:freebsd14
podman push "${IMAGE_PATH}"/node:freebsd14
echo
echo "node:freebsd14.3"
podman tag localhost/node:freebsd14.3 "${IMAGE_PATH}"/node:freebsd14.3
podman push "${IMAGE_PATH}"/node:freebsd14.3
# Quay
echo
echo "################################################################################"
IMAGE_PATH="quay.io/matiaspizarro"
echo "Pushing node-24 to ${IMAGE_PATH}"
echo
echo "node:24-freebsd"
podman tag localhost/node:24-freebsd "${IMAGE_PATH}"/node:24-freebsd
podman push "${IMAGE_PATH}"/node:24-freebsd
echo
echo "node:24-freebsd14"
podman tag localhost/node:24-freebsd14 "${IMAGE_PATH}"/node:24-freebsd14
podman push "${IMAGE_PATH}"/node:24-freebsd14
echo
echo "node:24-freebsd14.3"
podman tag localhost/node:24-freebsd14.3 "${IMAGE_PATH}"/node:24-freebsd14.3
podman push "${IMAGE_PATH}"/node:24-freebsd14.3
echo
echo "node:freebsd"
podman tag localhost/node:freebsd "${IMAGE_PATH}"/node:freebsd
podman push "${IMAGE_PATH}"/node:freebsd
echo
echo "node:freebsd14"
podman tag localhost/node:freebsd14 "${IMAGE_PATH}"/node:freebsd14
podman push "${IMAGE_PATH}"/node:freebsd14
echo
echo "node:freebsd14.3"
podman tag localhost/node:freebsd14.3 "${IMAGE_PATH}"/node:freebsd14.3
podman push "${IMAGE_PATH}"/node:freebsd14.3
Supported tags and respective Containerfile links
The MIT License (MIT)
files under license:
(source: https://github.com/nodejs/docker-node)
docker-entrypoint.sh
Copyright (c) 2015 Joyent, Inc.
Copyright (c) 2015 Node.js contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.