Open
Description
I've created a docker-compose.yml
file that should build portal and and run it.
I've cloned the repo to ./repo/portal
relative to the docker-compose.yml
.
The docker-compose.yml
looks like this:
services:
my_instance:
build:
context: ./repo/portal
dockerfile: Dockerfile
I had to up the golang and alpine images in the Dockerfile
like or it wouldn't build at all.
# Multi-stage build.
FROM golang:1.22-alpine3.20 as build-stage
# Copy source code and build binary.
ARG version
RUN mkdir /usr/app
COPY . /usr/app
WORKDIR /usr/app
RUN CGO=0 go build -ldflags="-s -X main.version=${version}" -o portal ./cmd/portal/
# Copy binary from build container and build image.
FROM alpine:3.14
RUN mkdir /usr/app
WORKDIR /usr/app
COPY --from=build-stage /usr/app/portal .
ENTRYPOINT [ "./portal", "serve"]
and this is the output
❯ docker-compose up
[+] Running 1/0
⠿ Container portal-my_instance-1 Created 0.0s
Attaching to portal-my_instance-1
portal-my_instance-1 | Error: server requires version to be set: could not parse provided string into semantic version
portal-my_instance-1 | Usage:
portal-my_instance-1 | portal serve [flags]
portal-my_instance-1 |
portal-my_instance-1 | Flags:
portal-my_instance-1 | -h, --help help for serve
portal-my_instance-1 | -p, --port int port to run the portal relay server on
portal-my_instance-1 |
portal-my_instance-1 | Global Flags:
portal-my_instance-1 | -v, --verbose .portal-[command].log Log debug information to a file on the format .portal-[command].log in the current directory
portal-my_instance-1 |
portal-my_instance-1 exited with code 1
Platform / Portal version (please complete the following information):
- OS and OS version: Raspbian (Debian GNU/Linux 11 (bullseye))
- Portal Version is the latest as of today
That's it. I hope it's not me who is making a mistake. I just wanted to test this fine software.