Dockerfile 738 B

123456789101112131415161718192021222324
  1. FROM golang:1.14
  2. ENV MYSQLTMPROOT urlooker.pass
  3. ENV MYSQL_MAJOR 5.7
  4. LABEL maintainer="710leo@gmail.com"
  5. WORKDIR /app
  6. RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 \
  7. && echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
  8. RUN echo mysql-community-server mysql-community-server/root-pass password $MYSQLTMPROOT | debconf-set-selections \
  9. && echo mysql-community-server mysql-community-server/re-root-pass password $MYSQLTMPROOT | debconf-set-selections \
  10. && apt-get update && apt-get install -y mysql-server
  11. COPY . .
  12. RUN ./control build
  13. VOLUME ["/var/lib/mysql"]
  14. EXPOSE 1984
  15. ENTRYPOINT ["./docker-entrypoint.sh"]