Whats the best way to deploy golang web app to Azure?

I’ve been trying three days now to deploy my simple golang web app to Azure. I tried building a container in docker and deploying to Azure, didn’t work. I tried using local git to deploy to Azure, didn’t work. This is the web app, https://github.com/AOhassan/GoSystemOfEquations. Need help, thanks in advance, I greatly appreciated.

Hi

Looked in your dockerfile and it shouldn’t work. It just download some packages and nothing more.

FROM golang:latest
MAINTAINER ahmedhosman@live.com
RUN mkdir /app
COPY . /app
RUN apt -y update && apt -y install git
RUN go get github.com/gosimple/slug
RUN go get github.com/gin-gonic/gin
RUN go get gopkg.in/russross/blackfriday.v2
RUN go get github.com/gin-gonic/contrib/sessions
WORKDIR /app

Use these instruktions https://medium.com/@chemidy/create-the-smallest-and-secured-golang-docker-image-based-on-scratch-4752223b7324 and to build your app in two stages. First an image to compile it and then a minimal image to run it.

Thanks, I’ll try this after I am done eating. I’ll keep you updated.

1 Like

Still not working. Is there a simpler way to do this using my git repo, on azure?

could you show me how you went about deploying a simple golang web app?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.