Ko: Easy Go Containers
ko.build
Ko: Easy Go Containers
1–10 of 41 posts
Re: Ko: Easy Go Containers
#2FROM alpine:latest AS base # Scratch does not have shell so we have to create non-root user in here and later copy it into scratch. RUN adduser -D -u 123456 appusr
FROM scratch # Copy the binary. COPY foo.bin /foo.bin # Copy the user and set is as active. COPY --from=base /etc/passwd /etc/passwd USER appusr # Non-root user cannot bind to "privileged" ports(Simple. But i can see ko being good alternative if you for some reason do not want to install docker on your computer but still be able to build docker containers.
Re: Ko: Easy Go Containers
#3I have used something like this in the past: FROM alpine:latest AS base # Scratch does not have shell so we have to create non-root user in here and later copy it into scratch. RUN adduser -D -u 123456 appusr FROM scratch # Copy the binary. COPY foo.bin /foo.bin # Copy the user and set is as active. COPY --from=base /etc/passwd /etc/passwd USER appusr # Non-root user cannot bind to "privileged" ports( Simple. But i c…
The already established good alternative to Docker desktop is Rancher Desktop[1].
Re: Ko: Easy Go Containers
#4I have used something like this in the past: FROM alpine:latest AS base # Scratch does not have shell so we have to create non-root user in here and later copy it into scratch. RUN adduser -D -u 123456 appusr FROM scratch # Copy the binary. COPY foo.bin /foo.bin # Copy the user and set is as active. COPY --from=base /etc/passwd /etc/passwd USER appusr # Non-root user cannot bind to "privileged" ports( Simple. But i c…
> i can see ko being good alternative if you for some reason do not want to install docker on your computer The already established good alternative to Docker desktop is Rancher Desktop[1]. [1] https://rancherdesktop.io/
Similar tools are Google's Jib for JVM based applications, `rules_docker` and `rules_oci` for Bazel etc.
All of which allow you to build applications without needing a Docker runtime at all during the build process which is a huge plus for portability, performance and repeatability.
Re: Ko: Easy Go Containers
#5Re: Ko: Easy Go Containers
#6`docker run $(ko build -L main.go)`
Re: Ko: Easy Go Containers
#7I have used something like this in the past: FROM alpine:latest AS base # Scratch does not have shell so we have to create non-root user in here and later copy it into scratch. RUN adduser -D -u 123456 appusr FROM scratch # Copy the binary. COPY foo.bin /foo.bin # Copy the user and set is as active. COPY --from=base /etc/passwd /etc/passwd USER appusr # Non-root user cannot bind to "privileged" ports( Simple. But i c…
> i can see ko being good alternative if you for some reason do not want to install docker on your computer The already established good alternative to Docker desktop is Rancher Desktop[1]. [1] https://rancherdesktop.io/
Re: Ko: Easy Go Containers
#8Earlier quoted context omitted.
> i can see ko being good alternative if you for some reason do not want to install docker on your computer The already established good alternative to Docker desktop is Rancher Desktop[1]. [1] https://rancherdesktop.io/
https://podman-desktop.io/
Re: Ko: Easy Go Containers
#9I have used something like this in the past: FROM alpine:latest AS base # Scratch does not have shell so we have to create non-root user in here and later copy it into scratch. RUN adduser -D -u 123456 appusr FROM scratch # Copy the binary. COPY foo.bin /foo.bin # Copy the user and set is as active. COPY --from=base /etc/passwd /etc/passwd USER appusr # Non-root user cannot bind to "privileged" ports( Simple. But i c…
Re: Ko: Easy Go Containers
#10Earlier quoted context omitted.
> i can see ko being good alternative if you for some reason do not want to install docker on your computer The already established good alternative to Docker desktop is Rancher Desktop[1]. [1] https://rancherdesktop.io/
https://podman-desktop.io/
Given that SUSE uses Podman, I hope they'll modify Rancher Desktop to use Podman, in which case it'd supersede Podman Desktop.