corso/docker/Dockerfile
Keepers dfdd162943
quick fix on image/user pair for images (#961)
## Type of change

- [x] 🐛 Bugfix

## Test Plan

- [x] 💪 Manual
2022-09-27 01:21:26 +00:00

30 lines
458 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 ubuntu:latest
COPY --from=build /corso /
USER nobody
ENTRYPOINT ["/corso"]