docker run -i --rm -p 8080:8080 default:latest fails for appsody quarkus stack - appsody

docker run -i --rm -p 8080:8080 default:latest fails for appsody quarkus stack. the image is tagged appsody-quarkus:latest
I tried
docker run -i --rm -p 8080:8080 appsody-quarkus:latest
$ docker run -i --rm -p 8080:8080 default:latest
Unable to find image 'default:latest' locally
docker: Error response from daemon: pull access denied for default, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

I think you have a typo, try appsody/quarkus

That is a typo in the README.md for the stack.
You have it right with appsody-quarkus:latest
There is a PR for fixing the doc
https://github.com/appsody/stacks/pull/451

Related

Connect with FTP to Docker Container

I'm new to Docker and I'm using this Microsoft SQL Server Docker Image
sudo docker pull mcr.microsoft.com/mssql/server:2019-latest
I've run the container on my linux server with this command which is from the microsoft doc:
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong#Passw0rd>" \
-p 1433:1433 --name sql1 --hostname sql1 \
-d mcr.microsoft.com/mssql/server:2019-latest
I can connect with ssh when I'm on my server with this command:
sudo docker exec -it sql1 "bash"
My problem is that I can't figure out how I can connect to this container with FTP.
I thought installing ftp on the image and then run with something like:
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong#Passw0rd>" \
-p 1433:1433 -p 21:21 --name sql1 --hostname sql1 \
-d mcr.microsoft.com/mssql/server:2019-latest
But I can't run it again without removing the image.
I Would be glad if someone could help me.
I did not found a way to get an FTP Access but the main purpose was to be able to move a file from the host into the container.
The way to do that is as simple as a ssh cp
sudo docker cp foo.txt containerID:/foo.txt
Thanks for the answers
You are not editing the image but the container that you create with that command.
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong#Passw0rd>" \
-p 1433:1433 -p 21:21 --name sql1 --hostname sql1 \
-d mcr.microsoft.com/mssql/server:2019-latest
Just run that command to create your container and use that container via
docker start sql1
and
sudo docker exec -it sql1 "bash"
and if you want to have an image of your container after you edited your Container, use the
docker commit sql1
or so. (You might read the documentation on docker commit for correct syntax.)
UPDATE:
As of the comments below, I'd like to recommend you to get yourself confident with the docker file usage instead of docker commit.

Install SQL Server on Mac

I am on the following page:
https://www.quackit.com/sql_server/mac/install_sql_server_on_a_mac.cfm
In step 1, it says to use the following Docker command in a terminal:
docker pull microsoft/mssql-server-linux
However, that command is outdated and did not work.
I made my way to the following URL:
https://hub.docker.com/_/microsoft-mssql-server
I used the following command I found there:
docker pull mcr.microsoft.com/mssql/server:2019-latest
Using the command directly above, I could see the terminal pulling and completing the installation.
So now in step 2, it says to use the following Docker command:
docker run -d --name Homer -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=myPassw0rd' -p 1433:1433 microsoft/mssql-server-linux
But then says if I used a different container, I have to replace "microsoft/mssql-server-linux" with my container image.
This is where I'm stuck.
I tried to use the following:
docker run -d --name Homer -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=myPassw0rd' -p 1433:1433 mcr.microsoft.com/mssql
But I get the following error:
Unable to find image 'mcr.microsoft.com/mssql:latest' locally
docker: Error response from daemon: manifest for mcr.microsoft.com/mssql:latest not found: manifest unknown: manifest tagged by "latest" is not found.
What am I doing wrong?
When you pulled the image, you used:
mcr.microsoft.com/mssql/server:2019-latest
When you ran the container, you used something else:
docker run -d ... mcr.microsoft.com/mssql
Why did you shorten this and leave stuff out of it? Docker can't read your mind or perform auto-complete for you. Try:
docker run -d ... mcr.microsoft.com/mssql/server:2019-latest

SQL Server in Docker network: executable file not found in $PATH": unknown

I want to create a Docker network and use it with a SQL Server.
Here is what I've done:
# Setup Network
sudo docker network create -d bridge dockerapi-dev
# Setup MSSQL Server
sudo docker pull mcr.microsoft.com/mssql/server
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=password" -p 1433:1433 -d mcr.microsoft.com/mssql/server --network dockerapi-dev --name mssqlserver
Under sudo docker network ls my network "dockerapi-dev" shows up as "bridge" as I want it to.
With the last command, I get the following error message:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"--network\": executable file not found in $PATH": unknown.
I would be grateful if someone could help me.
The error message is a hint that it thinks --network is part of the image to run.
Re-order your arguments like this (the image to run is last):
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=password" -p 1433:1433 -d --network dockerapi-dev --name mssqlserver mcr.microsoft.com/mssql/server

Attempting to run SQL Server on Docker for Mac: Event not found

I don't know what I am doing wrong. Have made many attempts to run SQL Server in Docker, but all have been unsuccessful. Here's a copy of the text in my terminal for the last attempt:
Jennifers-MacBook-Pro:~ ziema26$ sudo docker pull microsoft/mssql-server-linux
Password:
Using default tag: latest
latest: Pulling from microsoft/mssql-server-linux
Digest: sha256:6c4a13ade5778251bfba648c21fa7968f02aa5b86a7d8b66be710faf8626b38f
Status: Image is up to date for microsoft/mssql-server-linux:latest
Jennifers-MacBook-Pro:~ ziema26$
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<password>" -p 1433:1433 --name mydb2 -d microsoft/mssql-server-linux
-bash: !: event not found
In the examples found on the mssql-server-linux Dockerhub page, it recommeds using a strong password...with the example yourStrong(!)Password . If you try and connect to your container passing in special characters like (, ! or ) you'll have problems. Specifically ! is a special character in bash, which refers to the previous command resulting in that error you're receiving, -bash: !: event not found
You'll need to escape these characters, e.g docker exec -it mssql-container-name /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P yourStrong\(\!\)Password or use single quotes.

ms sql server on mac os x with docker

I want to run sql-server on a mac os x computer. I have successfully build and start a docker container this way:
docker pull microsoft/mssql-server-linux
docker create -v /var/opt/mssql --name volume_mssql microsoft/mssql-server-linux /bin/true
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=SuperPa3ss#1' -p 1433:1433 --volumes-from volume_mssql -d --name sqlserver1 microsoft/mssql-server-linux
It works fine. But i do not know what to do to restart this containers when the computer restarts...
Thanks
** edit **
if i type:
$ docker start volume_mssql
$ docker start sqlserver1
I have no error message, but i see the containers are "exited"
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f5721868bbe1 microsoft/mssql-server-linux "/bin/sh -c /opt/mss…" 15 hours ago Exited (255) 3 minutes ago sqlserver1
e5b88bb02a1b microsoft/mssql-server-linux "/bin/true" 15 hours ago Exited (0) 4 minutes ago volume_mssql
** edit **
$ docker container logs sqlserver1
Dump collecting thread [6] hit exception [6]. Exiting.
Dump collecting thread [7] hit exception [6]. Exiting.
For Autostart, docker container adds --restart always in docker run command.
Change your command to:
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=SuperPa3ss#1' --restart always -p 1433:1433 --volumes-from volume_mssql -d --name sqlserver1 microsoft/mssql-server-linux
Your container will start automatically when you restart the docker and PC.
From Terminal:
$ docker pull microsoft/mssql-server-linux
$ docker run -d — name sql_server_demo -e ‘ACCEPT_EULA=Y’ -e ‘SA_PASSWORD=Dev#998877’ -p 1433:1433 microsoft/mssql-server-linux
$ dokcer image ls
Now Download azure data studio from here,
https://learn.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15
Connect to SQL Server
Server: localhost
Authentication Type: SQL Login
User Name: sa
Password: Dev#99887
Steps by steps:
https://medium.com/macoclock/run-mssql-on-mac-using-docker-39460da701b9
You can find the container name by running: docker ps -a and use the name to start it using docker start <container-name>.
Alternatively, you can specify the container to start automatically by adding --restart always to the run command. This will make the container autostart once you restart the PC.

Resources