corso/build/Dockerfile
Vaibhav Kamra 0707d00ab5
Add a Dockerfile for corso (#247)
Adds a Dockerfile under the docker to package the corso binary.

This currently requires the user to build the corso binary (for linux/amd64) in the build image
prior to building the docker image. Follow up PRs will introduce a Makefile.

Also moves the build image to the build folder and adds a couple of README.md files with
instructions.

Fixes #218
2022-06-28 12:15:30 -07:00

15 lines
478 B
Docker

FROM golang:1.18
ARG uid=1000
ARG gid=1000
# Dockerfile with static deps that won't be changed. Right now there's no deps
# outside of what the go.mod file has to manage. Makes a user in the container
# with the same UID and GID as the current user so that the mounted directory
# doesn't end up with files with strange permissions.
RUN if [ ! $(getent group ${gid}) ]; then groupadd -g "${gid}" build; fi && \
useradd -m -u "${uid}" -g "${gid}" build
USER build:${gid}