Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright 2020 Docker, Inc.
  2. # Licensed under the Apache License, Version 2.0 (the "License");
  3. # you may not use this file except in compliance with the License.
  4. # You may obtain a copy of the License at
  5. # http://www.apache.org/licenses/LICENSE-2.0
  6. # Unless required by applicable law or agreed to in writing, software
  7. # distributed under the License is distributed on an "AS IS" BASIS,
  8. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. # See the License for the specific language governing permissions and
  10. # limitations under the License.
  11. # BUILD
  12. FROM ubuntu:latest
  13. # Update and upgrade repo
  14. RUN apt-get update -y -q && apt-get upgrade -y -q
  15. # Install tools we might need
  16. RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -q curl build-essential ca-certificates git
  17. # Download Go 1.2.2 and install it to /usr/local/go
  18. RUN curl -s https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz| tar -v -C /usr/local -xz
  19. # Let's people find our Go binaries
  20. ENV PATH $PATH:/usr/local/go/bin
  21. COPY dispatcher.go .
  22. RUN go build dispatcher.go
  23. EXPOSE 80
  24. CMD ["/dispatcher"]
  25. COPY static /static/