## Description Uses alpine in the base docker images, to gain access to a shell within corso containers. ## Type of change - [x] 🌻 Feature ## Issue(s) * #573 ## Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
30 lines
465 B
Docker
30 lines
465 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# This dockerfile is able to make a quick, local image of corso.
|
|
# It is not used for deployments.
|
|
|
|
## Build
|
|
FROM golang:1.18 AS base
|
|
|
|
WORKDIR /src
|
|
|
|
COPY ./src/go.mod .
|
|
COPY ./src/go.sum .
|
|
RUN go mod download
|
|
|
|
COPY ./src .
|
|
|
|
FROM base AS build
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /corso .
|
|
|
|
## Deploy
|
|
FROM alpine:3.16
|
|
|
|
COPY --from=build /corso /
|
|
|
|
USER nonroot:nonroot
|
|
|
|
ENTRYPOINT ["/corso"]
|