Skip to content

Commit 747d888

Browse files
author
Manthan Ankolekar
committed
feat: docker added
1 parent 504f531 commit 747d888

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/docker.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build and Publish Docker Image to DockerHub
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: DockerHub Login
15+
uses: docker/[email protected]
16+
with:
17+
username: ${{ secrets.DOCKERHUB_USERNAME }}
18+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
19+
20+
- name: Build the Docker image
21+
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/learn-javascript
22+
23+
- name: Docker Push
24+
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/learn-javascript

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM alpine:3.17.2
2+
CMD ["echo", "Hello World!"]

0 commit comments

Comments
 (0)