diff --git a/language-docker.cabal b/language-docker.cabal
--- a/language-docker.cabal
+++ b/language-docker.cabal
@@ -2,10 +2,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: dcb1ee69fa5273343e855a6671c943851c7dfe672278f892ef306e15a0362a21
+-- hash: e09dfb596ffa0aad47ade030ba31bd3d1fc4cb6395d7abef6290649bdedff1f6
 
 name:           language-docker
-version:        6.0.1
+version:        6.0.2
 synopsis:       Dockerfile parser, pretty-printer and embedded DSL
 description:    All functions for parsing, printing and writting Dockerfiles are exported through @Language.Docker@. For more fine-grained operations look for specific modules that implement a certain functionality.
                 See the <https://github.com/hadolint/language-docker GitHub project> for the source-code and examples.
diff --git a/src/Language/Docker.hs b/src/Language/Docker.hs
--- a/src/Language/Docker.hs
+++ b/src/Language/Docker.hs
@@ -85,7 +85,7 @@
     , Language.Docker.Syntax.Image(..)
     , Language.Docker.Syntax.Registry(..)
     , Language.Docker.Syntax.ImageAlias(..)
-    , Language.Docker.Syntax.Tag
+    , Language.Docker.Syntax.Tag(..)
     , Language.Docker.Syntax.Ports
     , Language.Docker.Syntax.Directory
     , Language.Docker.Syntax.Arguments
diff --git a/src/Language/Docker/PrettyPrint.hs b/src/Language/Docker/PrettyPrint.hs
--- a/src/Language/Docker/PrettyPrint.hs
+++ b/src/Language/Docker/PrettyPrint.hs
@@ -17,12 +17,19 @@
 import Data.Text (Text)
 import qualified Data.Text as Text
 import qualified Data.Text.Lazy as L
+import qualified Data.Text.Lazy.Builder as B
 import Data.Text.Prettyprint.Doc
 import Data.Text.Prettyprint.Doc.Internal (Doc(Empty))
 import Data.Text.Prettyprint.Doc.Render.Text (renderLazy)
 import Language.Docker.Syntax
 import Prelude hiding ((<>), (>>), return)
 
+data EscapeAccum = EscapeAccum
+    { buffer :: !B.Builder
+    , count :: !Int
+    , escaping :: !Bool
+    }
+
 instance Pretty (Arguments Text) where
     pretty = prettyPrintArguments
 
@@ -53,8 +60,8 @@
             pretty '@'
             pretty digest
             prettyAlias alias
-        UntaggedImage (Image _ name) alias -> do
-            pretty name
+        UntaggedImage img alias -> do
+            prettyPrintImage img
             prettyAlias alias
         TaggedImage img (Tag tag) alias -> do
             prettyPrintImage img
@@ -73,7 +80,7 @@
 prettyPrintPairs ps = hsep $ fmap prettyPrintPair ps
 
 prettyPrintPair :: (Text, Text) -> Doc ann
-prettyPrintPair (k, v) = pretty k <> pretty '=' <> pretty v
+prettyPrintPair (k, v) = pretty k <> pretty '=' <> doubleQoute v
 
 prettyPrintArguments :: Arguments Text -> Doc ann
 prettyPrintArguments (ArgumentsList as) = prettyPrintJSON (Text.words as)
@@ -84,8 +91,28 @@
 
 prettyPrintJSON :: [Text] -> Doc ann
 prettyPrintJSON args = list (fmap doubleQoute args)
+
+doubleQoute :: Text -> Doc ann
+doubleQoute w = enclose dquote dquote (pretty (escapeQuotes w))
+
+escapeQuotes :: Text -> L.Text
+escapeQuotes text =
+    case Text.foldr accumulate (EscapeAccum mempty 0 False) text of
+        EscapeAccum buffer _ False -> B.toLazyText buffer
+        EscapeAccum buffer count True ->
+            case count `mod` 2 of
+                0 -> B.toLazyText (B.singleton '\\' <> buffer)
+                _ -> B.toLazyText buffer
   where
-    doubleQoute w = enclose dquote dquote (pretty w)
+    accumulate '"' EscapeAccum {buffer, escaping = False} =
+        EscapeAccum (B.singleton '"' <> buffer) 0 True
+    accumulate '\\' EscapeAccum {buffer, escaping = True, count} =
+        EscapeAccum (B.singleton '\\' <> buffer) (count + 1) True
+    accumulate c EscapeAccum {buffer, escaping = True, count}
+        | count `mod` 2 == 0 = EscapeAccum (B.singleton c <> B.singleton '\\' <> buffer) 0 False
+        | otherwise = EscapeAccum (B.singleton c <> buffer) 0 False -- It was already escaped
+    accumulate c EscapeAccum {buffer, escaping = False} =
+        EscapeAccum (B.singleton c <> buffer) 0 False
 
 prettyPrintPort :: Port -> Doc ann
 prettyPrintPort (PortStr str) = pretty str
diff --git a/test/Language/Docker/EDSLSpec.hs b/test/Language/Docker/EDSLSpec.hs
--- a/test/Language/Docker/EDSLSpec.hs
+++ b/test/Language/Docker/EDSLSpec.hs
@@ -78,6 +78,14 @@
                                  , "RUN echo foo"
                                  ]
 
+        it "parses and prints from with a registry" $ do
+            let r = prettyPrint $ toDockerfile $ do
+                        from "opensuse/tumbleweed"
+                        run "echo foo"
+            r `shouldBe` printed [ "FROM opensuse/tumbleweed"
+                                 , "RUN echo foo"
+                                 ]
+
         it "parses and prints copy instructions" $ do
             let r = prettyPrint $ toDockerfile $ do
                         from "scratch"
@@ -92,6 +100,19 @@
                                  , "COPY foo.js bar.js baz/"
                                  , "COPY --from=builder something crazy"
                                  , "COPY --chown=www-data --from=builder this that"
+                                 ]
+        it "quotes label and env correctly" $ do
+            let r = prettyPrint $ toDockerfile $ do
+                        from "scratch"
+                        label [("email", "Example <example@example.com>")]
+                        label [("escape", "Escape this\" thing")]
+                        env [("foo", "bar baz")]
+                        env [("double_escape", "escape this \\\"")]
+            r `shouldBe` printed [ "FROM scratch"
+                                 , "LABEL email=\"Example <example@example.com>\""
+                                 , "LABEL escape=\"Escape this\\\" thing\""
+                                 , "ENV foo=\"bar baz\""
+                                 , "ENV double_escape=\"escape this \\\"\""
                                  ]
 
     describe "toDockerfileTextIO" $
