forked from verless/verless
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (31 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
36 lines (31 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This Dockerfile is designed for hacking on verless - the image
# distributed on Docker Hub is built using `application.Dockerfile`
# in the scripts directory.
#
# Build the image:
# $ docker image build -t verless .
#
# For hacking on verless, mount the source code against /src:
# $ docker container run -v $(pwd):/src verless
#
# This will run `go run cmd/verless/main.go`, meaning your code changes
# become visible immediately.
#
# Example: Change config.Version in to "my-version" and run the
# version command by appending it to the image name:
#
# $ docker container run -v $(pwd):/src verless version
# verless version my-version
#
# Also, the verless binary is available as `verless` command.
# Note that this is the version from the image build.
FROM golang:1.14-alpine
LABEL maintainer="Dominik Braun <[email protected]>"
RUN mkdir /project
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -v -o ./target/verless cmd/verless/main.go && \
cp ./target/verless /bin/verless
ENTRYPOINT ["go", "run", "cmd/verless/main.go"]