My project is in: https://github.com/BuddhiLW/free-riding
I can run it locally very easily. The instructions are in the
But, I’m unable to do the same in a docker container.
I would like to run a docker file that does three things:
lynx, which will be used by the go back-end.
- Run the front-end with
httpd(port 8000, inside the container).
- Run the Go server, which the front-end will makes requests to (port 8181, inside the container).
FROM ubuntu:22.04 RUN apt-get update RUN apt-get install -y lynx FROM httpd:2.4 COPY ./docs/ /usr/local/apache2/htdocs/ # Start from a Debian image with the latest version of Go installed # and a workspace (GOPATH) configured at /go. FROM golang # Copy the local package files to the container's workspace. ADD ./go/ /go/src/golang.org/x/example/outyet # Build the outyet command inside the container. # (You may fetch or manage dependencies here, # either manually or with a tool like "godep".) RUN go install golang.org/x/example/outyet # Run the outyet command by default when the container starts. ENTRYPOINT /go/bin/outyet # Document that the service listens on port 8080. EXPOSE 8181
I’m trying to run the docker container, with (the front end loads, but not the Go backend):
sudo docker run -dit --name my-running-app2 -p 8081:80 my-apache2