You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
751B

  1. FROM alpine:3.16
  2. # make sure it support go binary library
  3. # https://stackoverflow.com/questions/34729748/installed-go-binary-not-found-in-path-on-alpine-linux-docker
  4. RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
  5. # we don't compile golang at alpine, but we will compile it at somewhere else.
  6. ENV GO111MODULE=on
  7. ENV GOFLAGS=-mod=vendor
  8. #APP HOME
  9. ENV APP_HOME /biukop/web
  10. RUN mkdir -p "$APP_HOME"
  11. #update static html files
  12. RUN mkdir -p $APP_HOME/html
  13. COPY ./deploy/biukopweb-html $APP_HOME/html
  14. #copy production configuration file
  15. COPY ./deploy/config_production.json $APP_HOME/config.json
  16. COPY ./goweb $APP_HOME/goweb
  17. WORKDIR "$APP_HOME"
  18. EXPOSE 8080
  19. ENV PATH "$APP_HOME:$PATH"
  20. CMD ["goweb", "-f", "config.json"]