mirror of
https://git.myvelabs.com/novnc/alpine.git
synced 2025-12-18 01:46:21 +00:00
Alpine images
This commit is contained in:
commit
c8bf7daf02
16 changed files with 392 additions and 0 deletions
43
base/Dockerfile
Normal file
43
base/Dockerfile
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# syntax = docker/dockerfile:1.2
|
||||
FROM alpine:edge
|
||||
USER root
|
||||
|
||||
# Build ARG for additional pacman packages to install (eg, openssh)
|
||||
ARG addpkg
|
||||
|
||||
# Copy app folder
|
||||
COPY app /app
|
||||
|
||||
# Install noVNC
|
||||
RUN printf '%s\n' 'https://dl-cdn.alpinelinux.org/alpine/edge/main/' \
|
||||
'https://dl-cdn.alpinelinux.org/alpine/edge/community/' \
|
||||
'https://dl-cdn.alpinelinux.org/alpine/edge/testing/' >/etc/apk/repositories \
|
||||
&& apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache ${addpkg} \
|
||||
doas \
|
||||
bash bash-completion \
|
||||
novnc websockify \
|
||||
nginx \
|
||||
&& adduser -s /bin/bash -D user \
|
||||
&& printf '%s' 'permit nopass user as root cmd /usr/sbin/nginx' >/etc/doas.conf \
|
||||
&& passwd -l root >/dev/null 2>&1 \
|
||||
&& sed '/^http {/a\ \
|
||||
include /app/nginx/\*.conf;\n\ \
|
||||
types_hash_max_size 4096;\n\ \
|
||||
server_names_hash_bucket_size 128;\n' -i /etc/nginx/nginx.conf \
|
||||
&& chown -R user /app /usr/share/novnc/
|
||||
|
||||
# Default environment
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
ENV HOME=/home/user
|
||||
ENV DISPLAY=:0
|
||||
ENV SHELL=/bin/bash
|
||||
ENV PS1="[\u@\h \W \$?]\$ "
|
||||
|
||||
# Expose nginx port for VNC webui
|
||||
EXPOSE 6900
|
||||
|
||||
# Docker entrypoint
|
||||
ENTRYPOINT ["/app/entrypoint"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue