I am trying to containerize the Atlassian tool set (Jira, Bitbucket, Confluence, Bamboo) and back it with Postgresql.
I am a Docker newbie. Although I learned a lot today alone...
TLDR - I cannot get the Bitbucket wizard to accept the connection to Postgresql. I also do not have access to Kubernetes.
Note: I did use the --add-host=host.docker.internal:host.gateway to both containers. IS THIS A PROBLEM?!
I created and started the two necessary containers
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bba43f9e9aa6 atlassian/bitbucket "/usr/bin/tini -- /e…" 50 minutes ago Up 50 minutes 0.0.0.0:7990->7990/tcp, :::7990->7990/tcp, 0.0.0.0:7999->7999/tcp, :::7999->7999/tcp bitbucket-docker
050df8a05cce postgres "docker-entrypoint.s…" 54 minutes ago Up 54 minutes 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp postgres-docker
I created a docker network and connected both containers to it
[erik#localhost volumes]$ sudo docker network inspect atlassian-network
[
{
"Name": "atlassian-network",
"Id": "eb45fe5a08280ea0aacb9ee107edf26b9df690398d8e7e0db2d188662120d69a",
"Created": "2022-05-13T12:31:30.417700947-04:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"050df8a05cce53044cba9ab9b2aab80088c264228fc9e357077d60209db59e02": {
"Name": "postgres-docker",
"EndpointID": "1250dd25a1dc39faf9f56d2cb70b0b21922068840097c17c213b944b3d1e952b",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "172.18.0.2/16",
"IPv6Address": ""
},
"bba43f9e9aa6e677eb970734a2d16e955ceeff2f0e2ae328f50d377f74cd6a53": {
"Name": "bitbucket-docker",
"EndpointID": "ddcb259a4f5f217f144aa09fb99f059e9000a0c7afdcf8c2f0f4979479f7a5c4",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
I used the postgres client to test the connection from the Bitbucket container(bba) to the Postgres container(050)
root#bba43f9e9aa6:/var/atlassian/application-data/bitbucket# pg_isready -d bitbucket -h postgres-docker -p 5432 -U atlassian_user
postgres-docker:5432 - accepting connections
**************************************
The Bitbucket wizard (on 172.18.0.3:7990)
The configuration entered is not valid. A database connection could not be established. Please check your configuration and try again.
**************************************
Database -> ExternalType -> PostgreSQLHost-> postgres-dockerPort-> 5432DB Name -> bitbucketDB User -> atlassian_userDB Pass -> pass
Some more debugging...
root#050df8a05cce:/# psql bitbucket -U atlassian_user
psql (14.2 (Debian 14.2-1.pgdg110+1))
Type "help" for help.
bitbucket=# \conninfo
You are connected to database "bitbucket" as user "atlassian_user" via socket in "/var/run/postgresql" at port "5432".
root#050df8a05cce:/# ping bitbucket-docker
PING bitbucket-docker (172.18.0.3) 56(84) bytes of data.
64 bytes from bitbucket-docker.atlassian-network (172.18.0.3): icmp_seq=1 ttl=64 time=0.519 ms
64 bytes from bitbucket-docker.atlassian-network (172.18.0.3): icmp_seq=2 ttl=64 time=0.188 ms
64 bytes from bitbucket-docker.atlassian-network (172.18.0.3): icmp_seq=3 ttl=64 time=0.267 ms
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bba43f9e9aa6 atlassian/bitbucket "/usr/bin/tini -- /e…" About an hour ago Up About an hour 0.0.0.0:7990->7990/tcp, :::7990->7990/tcp, 0.0.0.0:7999->7999/tcp, :::7999->7999/tcp bitbucket-docker
050df8a05cce postgres "docker-entrypoint.s…" About an hour ago Up About an hour 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp postgres-docker
Related
I have the following docker-compose file:
services:
pgdatabase:
image: postgres:13
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=ny_taxi
volumes:
- "./data:/var/lib/postgresql/data:rw"
ports:
- "5432:5432"
pgadmin:
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=admin#admin.com
- PGADMIN_DEFAULT_PASSWORD=root
volumes:
- "./data_pgadmin:/var/lib/pgadmin"
ports:
- "8080:80"
I'm trying to connect to postgres using pgadmin but I'm getting the following error:
Unable to connect to server: could not translate host name "pgdatabase" to address: Name does not resolve
Running docker network ls I get:
NAME DRIVER SCOPE
bridge bridge local
docker-sql-pg_default bridge local
host host local
none null local
Then running docker network inspect docker-sql-pg_default I get
[
{
"Name": "docker-sql-pg_default",
"Id": "bfee2f08620b5ffc1f8e10d8bed65c4d03a98a470deb8b987c4e52a9de27c3db",
"Created": "2023-01-24T17:57:27.831702189Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.24.0.0/16",
"Gateway": "172.24.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"8f53be84a95c9c0591df6cc6edb72d4ca070243c3c067ab2fb14c2094b23bcee": {
"Name": "docker-sql-pg-pgdatabase-1",
"EndpointID": "7f3ddb29b000bc4cfda9c54a4f13e0aa30f1e3f8e5cc1a8ba91cee840c16cd60",
"MacAddress": "02:42:ac:18:00:02",
"IPv4Address": "172.24.0.2/16",
"IPv6Address": ""
},
"bf2eb29b73fe9e49f4bef668a1f70ac2c7e9196b13350f42c28337a47fcd71f4": {
"Name": "docker-sql-pg-pgadmin-1",
"EndpointID": "b3a9504d75e11aa0f08f6a2b5c9c2f660438e23f0d1dd5d7cf4023a5316961d2",
"MacAddress": "02:42:ac:18:00:03",
"IPv4Address": "172.24.0.3/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {
"com.docker.compose.network": "default",
"com.docker.compose.project": "docker-sql-pg",
"com.docker.compose.version": "2.13.0"
}
}
]
I tried to connect to the gateway IP 172.24.0.1 and the IP of postgres base 172.24.0.2 but I got timeout error. Why my network isn't running?
Basically I solved my problem using the following steps:
First I accessed the pg-admin container and I used ping to verify if the pgadmin could reach the postgres.
Since pgadmin was reaching postgres I used sudo netstat -tulpn | grep LISTEN to verify in my host machine the ports that are in use. surprisingly I have two instances of pgadmin running on 8080 (one bugged).
I used docker-compose down to stop the servers and used docker system prune to delete all images/containers...
I verified the used ports again and one pgadmin still running on 8080.
I used pidof to check the PID of running (bugged) pgadmin.
Then I used kill -9 to kill the proccess.
Last, I used docker-compose up -d and I was able to communicate pgadmin with postgres via pgadmin interface.
I am trying to connect with Postgres 13 from loopback 4 but its showing error
Cannot migrate database schema Error: Timeout in connecting after 5000 ms
at Timeout._onTimeout (/Users/mohammad/Work/prithu/prithuPlatform/node_modules/loopback-datasource-juggler/lib/datasource.js:2654:10)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
I tried connecting with pgadmin and its connecting fine and I also tried connecting it with express and its also connecting. It was connecting with earlier system but after changing system and installing Postgres 13 it's not working.
Here is the snapshot of app-db.datasource.config.json
{
"name": "app_db",
"connector": "postgresql",
"debug": true,
"host": "localhost",
"port": 5432,
"user": "adminuser",
"password": "password123",
"database": "testdb",
"ssl": false
}
Finally I figured out what was the problem. It was because I was using node 14. There was no problem with the database. I then install the node 12 and it's working now.
I faced the same issue.
I was putting the wrong password for postgres user in datasource.config, check that.
{
"name": "app_db",
"connector": "postgresql",
"debug": true,
"host": "localhost",
"port": 5432,
"user": "adminuser",
"password": "password123", (maybe this password is wrong)
"database": "testdb",
"ssl": false
}
I am trying to run the Hypeledger Explorer for my blockchain network. I have followed the instructions almost word for word using the Hyperldger Explorer
But anytime I do the final call: ./start.sh --- I get a litany of errors
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 12 UNIMPLEMENTED: unknown service protos.Endorser
at new createStatusError (/home/ubuntu/bludev/blockchain-explorer/node_modules/grpc/src/client.js:64:15)
at /home/ubuntu/bludev/blockchain-explorer/node_modules/grpc/src/client.js:583:15
error: [Client.js]: Failed Installed Chaincodes Query. Error: Error: 12 UNIMPLEMENTED: unknown service protos.Endorser
at new createStatusError (/home/ubuntu/bludev/blockchain-explorer/node_modules/grpc/src/client.js:64:15)
at /home/ubuntu/bludev/blockchain-explorer/node_modules/grpc/src/client.js:583:15
...
And so on. For more info I am using
nodejs 6.9 and PostgreSQL 9.5. This is the way my config.json file looks:
{
"network-config": {
"org1": {
"name": "peerOrg1",
"mspid": "Org1MSP",
"peer1": {
"requests": "grpc://127.0.0.1:7051",
"events": "grpc://127.0.0.1:7053",
"server-hostname": "peer0.org1.example.com",
"tls_cacerts": "/home/ubuntu/bludev/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"admin": {
"key": "/home/ubuntu/bludev/hlcomposer/fabric-dev-servers/fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore",
"cert": "/home/ubuntu/bludev/hlcomposer/fabric-dev-servers/fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
}
},
"host": "localhost",
"port": "3000",
"channel": "mychannel",
"keyValueStore": "/tmp/fabric-client-kvs",
"eventWaitTime": "30000",
"pg": {
"host": "12.109.99.233",
"port": "3000",
"database": "fabricexplorer",
"username": "postgres",
"passwd": "password1"
}}
The problem is your hyperledger network does not have any endorser in network.
try first-network sample from official fabric-samples folder, rebuild the explorer and then try again.
I have a mongo docker instance running on a remote server, what is the correct way to access the command line from my local machine?
If i login to the remote host, i can access this by:
$ docker exec -it mongo-dev mongo ccc-mongo
but i am unsure how to do this from my local machine.
I tried this:
$ ssh -L 4321:localhost:27017 khine#ccc1 -f -N
Are you sure you want to continue connecting (yes/no)? yes
khine#ccc1's password:
khine#dhegdheer:~/Sandboxes/$ mongo --port 4321
MongoDB shell version: 2.4.9
connecting to: 127.0.0.1:4321/test
channel 2: open failed: connect failed: Connection refused
Wed Sep 9 15:36:44.386 DBClientCursor::init call() failed
Wed Sep 9 15:36:44.388 Error: DBClientBase::findN: transport error: 127.0.0.1:4321 ns: admin.$cmd query: { whatsmyuri: 1 } at src/mongo/shell/mongo.js:147
exception: connect failed
on my remote machine i have 3 mongo instances running
khine#ccc1 /ccc $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
22a32b4f6a1d redis:2.8 "/entrypoint.sh redi 7 days ago Up 7 days 6379/tcp redis-web
167b022ab793 mongo:2.4 "/entrypoint.sh mong 7 days ago Up 7 days 27017/tcp mongo-web
ab84ea6cb44a redis:2.8 "/entrypoint.sh redi 2 weeks ago Up 2 weeks 6379/tcp redis-www
04dcc306af04 redis:2.8 "/entrypoint.sh redi 2 weeks ago Up 2 weeks 6379/tcp redis-dev
02c0c18307dc mongo:2.4 "/entrypoint.sh mong 2 weeks ago Up 2 weeks 27017/tcp mongo-www
61df69ec7edb mongo:2.4 "/entrypoint.sh mong 2 weeks ago Up 2 weeks 27017/tcp mongo-dev
running docker inspect, i get this:
khine#ccc1 /ccc $ docker inspect 61df69ec7edb
[{
"AppArmorProfile": "",
"Args": [
"mongod"
],
"Config": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": [
"mongod"
],
"CpuShares": 0,
"Cpuset": "",
"Domainname": "",
"Entrypoint": [
"/entrypoint.sh"
],
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"MONGO_VERSION=2.4.14"
],
"ExposedPorts": {
"27017/tcp": {}
},
"Hostname": "61df69ec7edb",
"Image": "mongo:2.4",
"HostConfig": {
"Binds": [
"/ccc/mongo-data/dev:/data/db"
],
"CapAdd": null,
"CapDrop": null,
"CgroupParent": "",
"Name": "/mongo-dev",
"NetworkSettings": {
"Bridge": "docker0",
"Gateway": "172.17.42.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.34",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"LinkLocalIPv6Address": "fe80::42:acff:fe11:22",
"LinkLocalIPv6PrefixLen": 64,
"MacAddress": "02:42:ac:11:00:22",
"PortMapping": null,
"Ports": {
"27017/tcp": null
}
},
"Path": "/entrypoint.sh",
"ProcessLabel": "",
"ResolvConfPath": "/var/lib/docker/containers/61df69ec7edb6995f06d797f5b2eed420d0c4daa4cd089c3b9174900d72d0b13/resolv.conf",
"RestartCount": 0,
"State": {
"Dead": false,
"Error": "",
"ExitCode": 0,
"FinishedAt": "0001-01-01T00:00:00Z",
"OOMKilled": false,
"Paused": false,
"Pid": 15346,
"Restarting": false,
"Running": true,
"StartedAt": "2015-08-26T06:01:55.361817334Z"
},
"Volumes": {
"/data/db": "/ccc/mongo-data/dev"
},
"VolumesRW": {
"/data/db": true
}
}
]
if i add the IP address for the instance, i get this warning
$ Warning: remote port forwarding failed for listen port 4321
any advice much appreciated.
I have a dockerfile which looks like this:
FROM ubuntu:trusty
RUN DEBIAN_FRONTEND=noninteractive apt-get -yq upgrade
# Update to latest
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C2518248EEA14886
RUN apt-get update
RUN apt-get upgrade -y
# Install basics
# RUN apt-get install -y python-software-properties software-properties-common unzip
RUN apt-get install -y unzip
# Install Java, auto-accepting the license
# RUN add-apt-repository -y ppa:webupd8team/java
# RUN apt-get update
# RUN echo oracle-java6-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
# RUN apt-get install -y oracle-java6-installer
RUN echo oracle-java6-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
# Install different Java versions
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq oracle-java6-installer
# Set environment variables pointing to different Java installations
ENV JAVA_HOME /usr/lib/jvm/java-6-oracle
ENV JAVA6_HOME /usr/lib/jvm/java-6-oracle
# Ensure Java 6 is the default version
RUN update-java-alternatives -s java-6-oracle
# Install JBoss 5.1.0.GA
RUN wget -O jboss.zip http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA-jdk6.zip/download
RUN unzip jboss.zip && mv jboss-5.1.0.GA /opt
RUN cd /opt/jboss-5.1.0.GA/bin && chmod +x *.sh
CMD /opt/jboss-5.1.0.GA/bin/run.sh
# Clean-up to reduce the image size
RUN apt-get clean
EXPOSE 8080
i build it than with:
sudo docker build -t dockerfile .
everything builds fine. so I start the server with:
sudo docker run -it --publish 127.0.0.1:8080:8080 dockerfile:latest
I can see that the server starts correctly
If I enter the URL 127.0.0.1:8080 i got an error site:
the connection was reset - the connection to the server was reset
while the page was loading
How do I get a connection to the server in my browser?
The inspect of my container looks like this:
[{
"Args": [
"-c",
"/opt/jboss-5.1.0.GA/bin/run.sh"
],
"Config": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": [
"/bin/sh",
"-c",
"/opt/jboss-5.1.0.GA/bin/run.sh"
],
"CpuShares": 0,
"Cpuset": "",
"Domainname": "",
"Entrypoint": null,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"JAVA_HOME=/usr/lib/jvm/java-6-oracle",
"JAVA6_HOME=/usr/lib/jvm/java-6-oracle"
],
"ExposedPorts": {
"8080/tcp": {}
},
"Hostname": "054aaccfd754",
"Image": "dockerfile:latest",
"Memory": 0,
"MemorySwap": 0,
"NetworkDisabled": false,
"OnBuild": null,
"OpenStdin": false,
"PortSpecs": null,
"SecurityOpt": null,
"StdinOnce": false,
"Tty": false,
"User": "",
"Volumes": null,
"WorkingDir": ""
},
"Created": "2014-11-27T11:35:34.538502513Z",
"Driver": "aufs",
"ExecDriver": "native-0.2",
"HostConfig": {
"Binds": null,
"CapAdd": null,
"CapDrop": null,
"ContainerIDFile": "",
"Devices": [],
"Dns": null,
"DnsSearch": null,
"ExtraHosts": null,
"Links": null,
"LxcConf": [],
"NetworkMode": "bridge",
"PortBindings": {
"8080/tcp": [
{
"HostIp": "172.17.42.1",
"HostPort": "8080"
}
]
},
"Privileged": false,
"PublishAllPorts": false,
"RestartPolicy": {
"MaximumRetryCount": 0,
"Name": ""
},
"VolumesFrom": null
},
"HostnamePath": "/var/lib/docker/containers/054aaccfd7544a0c14a9f53f94ea2be0c2d6d58437c5311f6507ce2e4466bfa7/hostname",
"HostsPath": "/var/lib/docker/containers/054aaccfd7544a0c14a9f53f94ea2be0c2d6d58437c5311f6507ce2e4466bfa7/hosts",
"Id": "054aaccfd7544a0c14a9f53f94ea2be0c2d6d58437c5311f6507ce2e4466bfa7",
"Image": "f820f5fe9d26c8e896b9d902492ba66f8ed679792047c9c3147b7045df0ed98f",
"MountLabel": "",
"Name": "/sleepy_franklin",
"NetworkSettings": {
"Bridge": "docker0",
"Gateway": "172.17.42.1",
"IPAddress": "172.17.0.5",
"IPPrefixLen": 16,
"MacAddress": "02:42:ac:11:00:05",
"PortMapping": null,
"Ports": {
"8080/tcp": [
{
"HostIp": "172.17.42.1",
"HostPort": "8080"
}
]
}
},
"Path": "/bin/sh",
"ProcessLabel": "",
"ResolvConfPath": "/var/lib/docker/containers/054aaccfd7544a0c14a9f53f94ea2be0c2d6d58437c5311f6507ce2e4466bfa7/resolv.conf",
"State": {
"ExitCode": 0,
"FinishedAt": "0001-01-01T00:00:00Z",
"Paused": false,
"Pid": 4236,
"Restarting": false,
"Running": true,
"StartedAt": "2014-11-27T11:35:35.120814905Z"
},
"Volumes": {},
"VolumesRW": {}
}
EDIT after jottrs answers:
the logs says:
....
11:36:32,963 INFO [TomcatDeployment] deploy, ctxPath=/admin-console
11:36:33,067 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console'
11:36:38,001 INFO [TomcatDeployment] deploy, ctxPath=/
11:36:38,068 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
11:36:38,232 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
11:36:38,314 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
11:36:38,341 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 1m:1s:805ms
nothing more....
because of Jottrs IP mention:
As far as i understood, I bind my server to 127.0.0.1:8080 with the start command:
sudo docker run -it --publish 127.0.0.1:8080:8080 dockerfile:latest
If I look with ifconfig i have the docker file running on:
$ ifconfig
docker0 Link encap:Ethernet Hardware Adresse 56:84:7a:fe:97:99
inet Adresse:172.17.42.1 Bcast:0.0.0.0 Maske:255.255.0.0
inet6-Adresse: fe80::5484:7aff:fefe:9799/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX-Pakete:86 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
TX-Pakete:101 Fehler:0 Verloren:0 Überläufe:0 Träger:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX-Bytes:4983 (4.9 KB) TX-Bytes:12056 (12.0 KB)
But with $ sudo docker inspect --format "{{ .NetworkSettings.IPAddress }}" 054
i get 172.17.0.5
But I also get no connection in my browser with the URL 172.17.0.5:8080 or URL 172.17.42.1:8080
also if I start with $ sudo docker run -d --publish 172.17.42.1:8080:8080 dockerfile:latest (the ifconfig IP) I will not get a connection (and still no reaction on the logs)
$ sudo docker exec -it 228 bash
root#22870ce4265e:/# cat /etc/hosts
172.17.0.6 22870ce4265e
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
The problem is JBoss not Docker. JBoss listen per default only to localhost:8080 Jboss only works on localhost:8080 ,but doesnt reply when called by ip (I'm not a JBoss guy so you have to try "-b 0.0.0.0" or to provide a server.xml via ADD in your Dockerfile).
When you run (in my case I called the container jboss)
sudo docker exec jboss apt-get install curl -y
sudo docker exec jboss curl localhost:8080
you notice that JBoss runs and is accessable.