Skip to content

Error during formatDockerfileContents #25

Open
@NancyKunath

Description

@NancyKunath

Formatting a dockerfile like this

console.log(
  await formatDockerfileContents(`
FROM nginx
WORKDIR /app
ARG PROJECT_DIR=/
ARG NGINX_CONF=nginx.conf
COPY $NGINX_CONF /etc/nginx/conf.d/nginx.conf
COPY $PROJECT_DIR /app
CMD mkdir --parents /var/log/nginx && nginx -g "daemon off;"
`.trim(),
    {
      indent: 4,
      spaceRedirects: false,
      trailingNewline: true,
    },
  ),
);

Leads to the following error:
Image

In the end, this results in prettier-plugin-sh failing because of our Dockerfile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions