获取错误:
admin1@POC-k8s-master:~/poc-cog/kafka/k8s1$ docker-compose up -d
ERROR: yaml.parser.ParserError: expected '<document start>', but found '<scalar>'
in "./docker-compose.yaml", line 36, column 1
admin1 @ POC-k8s-master:〜/ poc-cog / kafka / k8s1 $ cat docker-compose.yaml
FROM openjdk:8u151-jre-alpine
ARG kafka_version=1.1.0
ARG scala_version=2.12
ARG glibc_version=2.27-r0
MAINTAINER wurstmeister
ENV KAFKA_VERSION=$kafka_version \
SCALA_VERSION=$scala_version \
KAFKA_HOME=/opt/kafka \
GLIBC_VERSION=$glibc_version
ENV PATH=${PATH}:${KAFKA_HOME}/bin
COPY download-kafka.sh start-kafka.sh broker-list.sh create-topics.sh /tmp/
RUN apk add --no-cache bash curl jq docker \
&& mkdir /opt \
&& chmod a+x /tmp/*.sh \
&& mv /tmp/start-kafka.sh /tmp/broker-list.sh /tmp/create-topics.sh /usr/bin \
&& sync && /tmp/download-kafka.sh \
&& tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt \
&& rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz \
&& ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka \
&& rm /tmp/* \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk \
&& apk add --no-cache --allow-untrusted glibc-${GLIBC_VERSION}.apk \
&& rm glibc-${GLIBC_VERSION}.apk
COPY overrides /opt/overrides
VOLUME ["/kafka"]
# Use "exec" form so that it runs as PID 1 (useful for graceful shutdown)
CMD ["start-kafka.sh"]
Dockerfile来源:https://hub.docker.com/r/wurstmeister/kafka/dockerfile