Home > Blockchain >  docker: invalid reference format
docker: invalid reference format

Time:12-13

Im learning how to work with docker and my progress has been stopped by an error that I can't deal with.I've been looking for solutions on forums (including this site), but not one has helped me. I would be very grateful if you could help me figure this out

Im trying to put this simple node.js code into docker and run it:

const express = require('express')

const app = express()

app.get('/:name', (req, res) => {
    const { name } = req.params

    res.json({ message: `Hello, ${name}!`})
})

const PORT = process.env.PORT || 3000
console.log(`Server is listening port ${PORT}`)
app.listen(PORT)

To run it with docker I used:

 docker run -it --name counter --rm -v            
  • Related