Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Dockerfile #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

hudsantos
Copy link

No description provided.

@coveralls
Copy link

coveralls commented Apr 29, 2019

Pull Request Test Coverage Report for Build 333

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 64 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+2.007%) to 70.991%

Files with Coverage Reduction New Missed Lines %
lib/readme.js 5 76.71%
lib/server.js 59 68.72%
Totals Coverage Status
Change from base Build 278: 2.007%
Covered Lines: 328
Relevant Lines: 433

💛 - Coveralls

@F1LT3R
Copy link
Collaborator

F1LT3R commented Dec 28, 2019

Thank you @hudsantos !

@F1LT3R
Copy link
Collaborator

F1LT3R commented Dec 28, 2019

@hudsantos - Can you provide instructions in the README on how to use Docker?

I tried downloading/installing Docker and using the command in the dockerfile you provided, but it does not appear to do anything.

# where alistairgmacdonald is the docker username I signed up with
sudo docker build -t alistairgmacdonald/markserv

I have tried with and without sudo.

Any ideas how I can test this?

@hudsantos
Copy link
Author

Hello @F1LT3R to use docker command you'll need to rely on sudo (or being root) only to avoid permission denied errors like:

# For example let's say we want to list our actually running containers with 'ps' argument:
user@box:~$ docker ps
Got permission denied while trying to connect to the Docker daemon socket at docker.sock: Get docker.sock: connect: permission denied
user@box:~$ echo $?
1

So, being superuser will give you permissions for running everything without issues.

IMPORTANT: Other important aspect I realized about the way you said you tried is that: it's missing a dot at the end of the command line, which represents the PATH required by the docker build command to work on. I'm sure you already know about the dot representing current directory in UNIX, but even tho I'll write it down in details here explaining also for others that maybe will benefit from this explanation. Cause not everyone starting with docker knows the docker build command requires a PATH.

You said:

# where alistairgmacdonald is the docker username I signed up with
sudo docker build -t alistairgmacdonald/markserv

Where it should be (note the dot at the end):

# where alistairgmacdonald/markserv is only a tag name you don't even need to be logged in to docker hub with a docker username, and the dot represents the current directory, where is the Dockerfile (yes we assume you've already 'cd' to that directory when running this command)
sudo docker build -t alistairgmacdonald/markserv .

And it also could be:

# a path to the directory where the Dockerfile is, instead of being in that directory and invoking the dot:
sudo docker build -t alistairgmacdonald/markserv /path/to/markserv/dir

I also provided a README.md brief explanation as you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants