Minecraft docker-container refuses connection

So I have this Dockerfile:

FROM openjdk:8u212-jre-alpine

LABEL maintainer "cowboy_patrick"

RUN apk add --no-cache -U 
  openssl 
  imagemagick 
  lsof 
  su-exec 
  shadow 
  bash 
  curl iputils wget 
  git 
  jq 
  python 
  tzdata 
  rsync 
  nano 
  sudo 
  knock 
  ttf-dejavu
  
EXPOSE 25565 25565

COPY minecraft /root/minecraft
WORKDIR /root/minecraft


RUN chmod +x /root/minecraft/start_minecraft.sh

CMD /root/minecraft/start_minecraft.sh

This just copies an existing world into an alpine with java and executes some prewritten scripts, I had written for running it on a vps (doing automatic backups etc.)

When I execute it with

docker run –network host -p 25565:25565 –name mcs mcserver

I can see the following in the container-dashboard:
port forwarded

For good measures you can see my console-output here but it’s pretty standard. Just a minecraft-server that boots up.

The only thing I don’t understand is why the connection gets refused when I try to join localhost:25565:
connection refused

Does anyone have an idea on how I can allow this connection? And in extent allow connections from outside my machine (assuming that port-formwarding and everything works).

Go to Source
Author: Cowboy_Patrick

Difference between a buildpack and a dockerfile?

I understand a dockerfile to be a comprehensive set of instructions to completely build an application’s production (and development for that matter) environment from scratch (or at least from a bare linux distribution).

I understand a buildpack to be something responsible for retrieving and installing collections of dependencies and (similarly to docker) merging these to provide the app’s running environment. I also see from here:

Buildpacks were first conceived by Heroku in 2011. Since then, they have been adopted by Cloud Foundry and other PaaS such as Google App Engine, Gitlab, Knative, Deis, Dokku, and Drie.

But I wonder what are the differences then? E.g.

  • Are dockerfiles allowing more options than heroku buildpacks?
  • Do both have the same capabilities in terms of permissions and users?
  • Are they as versatile as eachother? (I know docker images can be run almost anywhere there is docker, is the same true of buildpacks?)
  • What other differences are there?

Go to Source
Author: stevec

Unable to build Image as it is asking some input

I am trying to create an Image which will run ftp server on centos. Dockerfile content is as below:

FROM centos
 
RUN 
  yum update -y && 
  yum install vsftpd -y 
 
EXPOSE 21
CMD vsftpd -DFOREGROUN

I am running below command :

docker build -f webserver .

which is asking me input as below:

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
 
  1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
  2. America     5. Arctic     8. Europe    11. SystemV
  3. Antarctica  6. Asia       9. Indian    12. US
Geographic area: 9

once I enter 9 and press enter button, it stuck at the same window. Can you please help me, how should I process this?

Go to Source
Author: Puneet Dixit

How to send user input as some text inside Dockerfile?

I have following Dockerfile:

FROM ubuntu
RUN apt-get -y update
RUN apt-get -y install ttf-dejavu
COPY ./soap.sh /
RUN chmod +x /soap.sh
ENTRYPOINT ["/soap.sh"]
CMD ["/script.sh", "arg1"]

I am trying to install SoapUI using above Dockerfile.

Using above Dockerfile, I am able to build the image Successfully as shown below:

root@test00-new:/home/sam/1_Docker# docker build -t balu1 .
Sending build context to Docker daemon  385.8MB
Step 1/8 : FROM ubuntu
 ---> 1e4467b07108
Step 2/8 : MAINTAINER Sample
 ---> Running in c6dc0992d25c
Removing intermediate container c6dc0992d25c
 ---> 7ecd8a4fcbfd
Step 3/8 : RUN apt-get -y update
 ---> Running in aa6467b0fc5c
 ---> cd3b7f8f5389
Step 4/8 : RUN apt-get -y install ttf-dejavu
 ---> Running in 8fcc7ce6ab9f
 ---> 55649115b86c
Step 5/8 : COPY ./soap.sh /
 ---> 2c236754e2d5
Step 6/8 : RUN chmod +x /soap.sh
 ---> Running in 408d72761df5
Removing intermediate container 408d72761df5
 ---> 17d2afb0bc43
Step 7/8 : ENTRYPOINT ["/soap.sh"]
 ---> Running in 0b10d8b91d65
Removing intermediate container 0b10d8b91d65
 ---> a7d0b50d4fdd
Step 8/8 : CMD ["/script.sh", "arg1"]
 ---> Running in a8ba5d134b5d
Removing intermediate container a8ba5d134b5d
 ---> d41cffedccda
Successfully built d41cffedccda
Successfully tagged balu1:latest
root@test00-new:/home/sam/1_Docker# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
balu1               latest              d41cffedccda        29 seconds ago      351MB
ubuntu              latest              1e4467b07108        3 weeks ago         73.9MB
root@test00-new:/home/sam/1_Docker#

But When I run the docker using above image, I am getting the following output:

root@test00-new:/home/sam/1_Docker# docker run balu1 OK
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
This will install SoapUI 5.2.1 on your computer.
OK [o, Enter], Cancel [c]
root@test00-new:/home/sam/1_Docker# 

In the above case how to handle user input in Dockerfile?

I need to send a letter o or ENTER as input inside Dockerfile

Please guide me on this.

Go to Source
Author: data123

How to run Dockerfile agent on a Jenkins Slave Node?

I have an issue with Running Dockerfile in Jenkins Pipeline on a Slave Node server.
Have posted in main StackOverflow portal. happy to see this DevOps Stackexachange portal.

just linking the ticket here : https://stackoverflow.com/questions/63364558/how-to-run-dockerfile-agent-on-a-jenkins-slave-node/63366121

It would be really helpful if someone can share their thoughts.
Thanks in advance.

Go to Source
Author: Venkatesha K