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

(Ahmed Osman) #1

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.

(Johan Dahl) #2


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

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.

(Ahmed Osman) #3

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

(Ahmed Osman) #4

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

(Ahmed Osman) #5

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