mirror of
https://github.com/docker/compose.git
synced 2025-07-16 18:24:26 +02:00
aci-demo: Update web service Dockerfile
Signed-off-by: Chris Crone <christopher.crone@docker.com>
This commit is contained in:
parent
74773b9062
commit
faf120a5c0
@ -12,24 +12,12 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
# BUILD
|
# BUILD
|
||||||
FROM ubuntu:latest
|
FROM golang:alpine AS build
|
||||||
|
|
||||||
# Update and upgrade repo
|
|
||||||
RUN apt-get update -y -q && apt-get upgrade -y -q
|
|
||||||
|
|
||||||
# Install tools we might need
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -q curl build-essential ca-certificates git
|
|
||||||
|
|
||||||
# Download Go 1.2.2 and install it to /usr/local/go
|
|
||||||
RUN curl -s https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz| tar -v -C /usr/local -xz
|
|
||||||
|
|
||||||
# Let's people find our Go binaries
|
|
||||||
ENV PATH $PATH:/usr/local/go/bin
|
|
||||||
|
|
||||||
COPY dispatcher.go .
|
COPY dispatcher.go .
|
||||||
RUN go build dispatcher.go
|
RUN mkdir -p /out && go build -o /out/dispatcher dispatcher.go
|
||||||
|
|
||||||
|
FROM alpine AS run
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["/dispatcher"]
|
CMD ["/dispatcher"]
|
||||||
|
|
||||||
COPY static /static/
|
COPY static /static/
|
||||||
|
COPY --from=build /out/dispatcher /dispatcher
|
||||||
|
Loading…
x
Reference in New Issue
Block a user