# docker build -f Dockerfile.extend -t accetto/debian-vnc-xfce-g3:extended . ### This is an example of extending the images. ### HINTS ### Sometimes you can get building errors related to cache handling. ### One of the following usually helps: ### (1) Use the '--no-cache' option ### > docker build ... --no-cache ### (2) Purge the builder cache before and/or between builds ### > docker builder prune ### (3) Re-open the terminal and/or Visual Studio Code ### (4) Remove the line containing 'rm -rf /var/lib/apt/lists/*' ### from your extending Dockerfile (like this one) ### choose a base image and tag ARG BASEIMAGE="accetto/debian-vnc-xfce-g3" # ARG BASEIMAGE="accetto/debian-vnc-xfce-chromium-g3" # ARG BASEIMAGE="accetto/debian-vnc-xfce-firefox-g3" ARG BASETAG="latest" FROM ${BASEIMAGE}:${BASETAG} ### switch to the root user to be able to install new packages USER 0 ### update the apt cache and install your new packages ### e.g. vim editor RUN \ apt-get update \ && apt-get install -y --no-install-recommends \ vim \ && apt-get -y autoremove \ && rm -rf /var/lib/apt/lists/* ### maybe you want to add some additional resources ### e.g. some preconfigured files # COPY ./bashrc "${HOME}"/.bashrc # COPY ./firefox.plus/user.js "${HOME}"/firefox.plus/ ### usually you want to swich back to a non-root user ### alternatively you can do it in a compose file (see 'example.yml') USER 1000 ### note that some applications refuse to be installed under the root user ### those you have to install after switching the user # RUN \ # apt-get update \ # && apt-get install -y \ # \ # && apt-get -y autoremove \ # && rm -rf /var/lib/apt/lists/*