This repository was archived by the owner on Nov 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-17
lines changed
aci_secrets_resources/web Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
# BUILD
15
- FROM ubuntu:latest
16
-
17
- # Update and upgrade repo
18
- RUN apt-get update -y -q && apt-get upgrade -y -q
19
-
20
- # Install tools we might need
21
- RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -q curl build-essential ca-certificates git
22
-
23
- # Download Go 1.2.2 and install it to /usr/local/go
24
- RUN curl -s https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz| tar -v -C /usr/local -xz
25
-
26
- # Let's people find our Go binaries
27
- ENV PATH $PATH:/usr/local/go/bin
28
-
15
+ FROM golang:1.16-alpine AS build
29
16
COPY dispatcher.go .
30
- RUN go build dispatcher.go
17
+ RUN mkdir -p /out && go build -o /out/dispatcher dispatcher.go
31
18
19
+ FROM alpine AS run
32
20
EXPOSE 80
33
21
CMD ["/dispatcher" ]
34
-
35
22
COPY static /static/
23
+ COPY --from=build /out/dispatcher /dispatcher
Original file line number Diff line number Diff line change 18
18
FROM golang:1.16-alpine AS build
19
19
COPY main.go .
20
20
RUN --mount=type=cache,target=/go/pkg/mod \
21
- CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o server main.go
21
+ go build -trimpath -ldflags="-s -w" -o server main.go
22
22
23
23
FROM alpine
24
24
RUN apk --no-cache add curl
You can’t perform that action at this time.
0 commit comments