-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile code improvements and labeles added.
Dockerfile code improvements and labeles added. The improvements include using bash as default shell for bettter error detection while performing install and start of container. Signed-off-by: Milosz Linkiewicz <[email protected]>
- Loading branch information
Showing
1 changed file
with
22 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
FROM alpine:3.18 | ||
|
||
# set version label | ||
ARG BUILD_DATE | ||
ARG VERSION | ||
ARG WEBAPP_VERSION | ||
LABEL build_version="netboot.xyz version: ${VERSION} Build-date: ${BUILD_DATE}" | ||
LABEL maintainer="antonym" | ||
ARG BUILD_DATE="10/7/2024" | ||
ARG VERSION="0.7.3" | ||
ARG WEBAPP_VERSION="0.7.3" | ||
|
||
LABEL org.opencontainers.image.authors="[email protected]" | ||
LABEL org.opencontainers.image.url="https://github.com/netbootxyz/webapp" | ||
LABEL org.opencontainers.image.title="NetBoot.xyz WebApp" | ||
LABEL org.opencontainers.image.description="NetBoot.xyz WebApp: A NodeJS helper application for managing local deployments of netboot.xyz" | ||
LABEL org.opencontainers.image.documentation="https://netboot.xyz/docs/docker" | ||
LABEL org.opencontainers.image.version="${WEBAPP_VERSION}" | ||
LABEL org.opencontainers.image.vendor="https://NetBoot.xyz" | ||
LABEL org.opencontainers.image.licenses="Apache-2.0 license" | ||
|
||
RUN apk add --no-cache bash | ||
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] | ||
|
||
RUN \ | ||
apk upgrade --no-cache && \ | ||
|
@@ -26,15 +36,13 @@ RUN \ | |
supervisor \ | ||
syslog-ng \ | ||
tar \ | ||
tftp-hpa | ||
|
||
RUN \ | ||
tftp-hpa && \ | ||
groupmod -g 1000 users && \ | ||
useradd -u 911 -U -d /config -s /bin/false nbxyz && \ | ||
usermod -G users nbxyz && \ | ||
mkdir /app \ | ||
/config \ | ||
/defaults | ||
/defaults | ||
|
||
COPY . /app | ||
|
||
|
@@ -43,10 +51,12 @@ RUN \ | |
|
||
ENV TFTPD_OPTS='' | ||
|
||
EXPOSE 3000 | ||
EXPOSE 8080 | ||
EXPOSE 69/UDP 80/TCP 3000/TCP 8080/TCP | ||
VOLUME ["/assets", "/config"] | ||
|
||
COPY root/ / | ||
CMD ["/start.sh"] | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
# default command | ||
CMD ["sh","/start.sh"] | ||
ENTRYPOINT ["/start.sh"] |