Skip to content

Commit

Permalink
Merge pull request #2 from B0nam/1-melhorias-gerais-no-projeto
Browse files Browse the repository at this point in the history
General Improves
  • Loading branch information
B0nam committed May 7, 2024
2 parents 44b161b + f7d142e commit 64c8225
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 25 deletions.
18 changes: 9 additions & 9 deletions Base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
FROM debian:11.1-slim

# ENVIRONMENT VARIABLES
ENV DISPLAY=:1 \
VNC_PORT=5901 \
NO_VNC_PORT=6901 \
NO_VNC_PORT=8080 \
VNC_COL_DEPTH=32 \
VNC_RESOLUTION=1024x768

ENV DEBIAN_FRONTEND=noninteractive
VNC_RESOLUTION=1024x768 \
DEBIAN_FRONTEND=noninteractive \
TERM=xterm

# INSTALL DEPENDENCIES
RUN apt-get update && \
apt-get install --no-install-recommends -y \
xvfb xauth \
xvfb xauth xterm \
wget sudo git bzip2 python ca-certificates \
tigervnc-standalone-server tigervnc-common firefox-esr; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


ENV TERM xterm

# GET NOVNC
RUN git clone --branch v1.2.0 --single-branch https://github.com/novnc/noVNC.git /opt/noVNC; \
git clone --branch v0.9.0 --single-branch https://github.com/novnc/websockify.git /opt/noVNC/utils/websockify; \
ln -s /opt/noVNC/vnc.html /opt/noVNC/index.html

RUN mkdir /src
COPY entrypoint.sh /src

EXPOSE 5901 6901
EXPOSE 5901 8080
ENTRYPOINT ["/src/entrypoint.sh"]
16 changes: 8 additions & 8 deletions Fluxbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM debian:11.1-slim

# ENVIRONMENT VARIABLES
ENV DISPLAY=:1 \
VNC_PORT=5901 \
NO_VNC_PORT=6901 \
NO_VNC_PORT=8080 \
VNC_COL_DEPTH=32 \
VNC_RESOLUTION=1024x768

ENV DEBIAN_FRONTEND=noninteractive
VNC_RESOLUTION=1024x768 \
DEBIAN_FRONTEND=noninteractive \
TERM=xterm

# INSTALL DEPENDENCIES
RUN apt-get update && \
apt-get install --no-install-recommends -y \
xvfb xauth fluxbox \
Expand All @@ -16,15 +18,13 @@ RUN apt-get update && \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


ENV TERM xterm

# GET NOVNC
RUN git clone --branch v1.2.0 --single-branch https://github.com/novnc/noVNC.git /opt/noVNC; \
git clone --branch v0.9.0 --single-branch https://github.com/novnc/websockify.git /opt/noVNC/utils/websockify; \
ln -s /opt/noVNC/vnc.html /opt/noVNC/index.html

RUN mkdir /src
COPY entrypoint.sh /src

EXPOSE 5901 6901
EXPOSE 5901 8080
ENTRYPOINT ["/src/entrypoint.sh"]
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# DEBIAN-DOCKER-NOVNC

This repository contains Dockerfiles to generate Debian images equipped with NOVNC (HTML5 VNC client).

## Overview

This repository offers a collection of Dockerfiles to create Debian-based Docker images with integrated NOVNC support. NOVNC facilitates remote access to graphical desktop environments via web browsers, offering flexibility and convenience for various visualization tasks.

### Base

The Base image contains only the necessary packages and installations to set up a NOVNC server.

### Fluxbox

The Fluxbox image contains the Fluxbox window manager, providing a lightweight and customizable environment for users.

### Xfce4

The Xfce4 image contains the Xfce4 window manager, offering a user-friendly and feature-rich desktop environment.

## Usage

### Build and run
To utilize these Dockerfiles:

1. Navigate to the desired subfolder (`Base`, `Fluxbox`, or `Xfce4`).
2. Build the Docker image using the provided Dockerfile:

```bash
docker build -t <image_name> .
```

Replace `<image_name>` with your preferred name for the image.

3. Once the image is built, run it using the following command:

```bash
docker run -d -p 8080:8080 <image_name>
```

### Or Pull image from dockerhub

```bash
docker run -d -p 8080:8080 b0nam/debian-novnc:<image_tag>
```

Access the NOVNC interface by opening a web browser and navigating to `http://localhost:8080`.
17 changes: 9 additions & 8 deletions Xfce4/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM debian:11.1-slim


# ENVIRONMENT VARIABLES
ENV DISPLAY=:1 \
VNC_PORT=5901 \
NO_VNC_PORT=6901 \
NO_VNC_PORT=8080 \
VNC_COL_DEPTH=32 \
VNC_RESOLUTION=1024x768

ENV DEBIAN_FRONTEND=noninteractive
VNC_RESOLUTION=1024x768 \
DEBIAN_FRONTEND=noninteractive \
TERM=xterm

# INSTALL DEPENDENCIES
RUN apt-get update && \
apt-get install --no-install-recommends -y \
xvfb xauth dbus-x11 xfce4 xfce4-terminal \
Expand All @@ -21,9 +24,7 @@ RUN apt-get update && \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


ENV TERM xterm

# GET NOVNC
RUN git clone --branch v1.2.0 --single-branch https://github.com/novnc/noVNC.git /opt/noVNC; \
git clone --branch v0.9.0 --single-branch https://github.com/novnc/websockify.git /opt/noVNC/utils/websockify; \
ln -s /opt/noVNC/vnc.html /opt/noVNC/index.html
Expand All @@ -32,5 +33,5 @@ RUN git clone --branch v1.2.0 --single-branch https://github.com/novnc/noVNC.git
RUN mkdir /src
COPY entrypoint.sh /src

EXPOSE 5901 6901
EXPOSE 5901 8080
ENTRYPOINT ["/src/entrypoint.sh"]

0 comments on commit 64c8225

Please sign in to comment.