This commit is contained in:
smita050 2024-06-02 21:41:07 +00:00 committed by GitHub
commit acc97b6af2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 46 additions and 0 deletions

34
.github/workflows/docker-image.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Docker Image CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: smita050sapar/ridecell-assignment-no1:latest

View File

View File

@ -1,3 +1,15 @@
FROM golang:1.16
WORKDIR /app
COPY . .
RUN go mod download
RUN go build -o /guestbook-go
EXPOSE 3000
CMD ["/guestbook-go"]
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");