The last line specifies the command to run when the container is started. The configuration file will be downloaded and prepared shortly. The file is copied from the Host’s folder at ‘./nf’ to the container folder ‘/root/.minetest/nf’. Once the folder is created in the script we will need to copy a configuration file to the new folder in line eight. The seventh line, ‘ RUN mkdir /root/.minetest’, causes a hidden folder within the Root folder which will be used by Minetest. The line ‘RUN apt install minetest -y’ causes the minetest program to be downloaded and installed from the new repository. The fourth line adds the repository for Minetest and the fifth line updates the repository information since a new repository was added. Try to make the lines run without any interaction by using the parameter ‘-y’ when possible. The third line, ‘RUN apt install software-properties-common -y’, adds the software which is needed when adding a repository which is done on the fourth line. When you need to perform a file installation to your Linux distro you need to first download a fresh copy of the repository information. The second line of dockefile is ‘RUN apt update’. Any version of Ubuntu should be acceptable, but I am specifically using Xenial to show how to get a different base image version. You can use any one of these names to specify the version of the base image to use. You can see the one line shows the version 16.04 and has three different names. If you scroll down you should see a list of ‘Supported tags’. A list of results should be displayed and you need to find and click on the result for ‘Ubuntu’. We are not getting the most recent version of Ubuntu, but getting Ubuntu 16.04. The first line ‘FROM ubuntu:xenial’ is different than we used in the previous article. RUN add-apt-repository ppa:minetestdevs/stableĬOPY. RUN apt install software-properties-common -y Within the ‘MTServer’ folder create the file ‘dockerfile’ and place the following in it: In your folder ‘~/Docker/’ create a folder named ‘MTServer’. There are methods to retain the data in the container which we will cover. This is mainly for the purpose of demonstrating the method to create a container. NOTE: Be aware that the world created is lost once the container is stopped. The Minetest server can be accessed from Minetest clients to allow for multiple players to access the same world. The container will be running a Minetest server which is a clone of Minecraft. To do this we will be doing a lot different things to accomplish making the container so there will be a lot to learn. The container we will make will be accessible from other systems on the network. The container will not be interactive like the previous one. In this article we will be going over making a more advanced container. The container could be used on another system by being moved to another Linux Operating System or even a Windows or MacOS system running Docker. We previously looked at making a basic Docker container which allowed interaction from a user.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |