Ansplz
Ansplz

Reputation: 213

Vagrant not working, server not found

Am working on setting up vagrant in windows 10

When i execute the command vagrant up am getting this error: -

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /vagrant/Dockerfile: no such file or directory

My vagrant File:--

#run a docker image
    user.vm.provision "docker" do |d|
        d.build_image "/vagrant", args: "-t my-php-apache-image"
        d.run "my-php-apache-image", args: " -p 8080:80 -v /vagrant:/var/www/html"

Dockerfile:

FROM php:7.0-apache

There is an "app" folder which has a simple echo hello world command in vagrant root .Last day it was working file but not working now.I didnt change anything i run the same commmand , vagrant up

Thanks

Upvotes: 1

Views: 167

Answers (1)

Fendi jatmiko
Fendi jatmiko

Reputation: 2895

it seems like your Vagrant are unable to locate the Dockerfile are you sure in the same directory ..? another option if you're using windows is to use txt format for Dockerfile i.e docker build -t my-php-apache-image -f ./Dockerfile.txt

Upvotes: 1

Related Questions