<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vitor Ferreira</title>
    <description>The latest articles on DEV Community by Vitor Ferreira (@vitorstick).</description>
    <link>https://dev.to/vitorstick</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F237093%2F78938ee5-f395-4ec7-a067-65655ba79ddd.png</url>
      <title>DEV Community: Vitor Ferreira</title>
      <link>https://dev.to/vitorstick</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vitorstick"/>
    <language>en</language>
    <item>
      <title>How did I made a circle withing another circle</title>
      <dc:creator>Vitor Ferreira</dc:creator>
      <pubDate>Thu, 21 Dec 2023 15:44:51 +0000</pubDate>
      <link>https://dev.to/vitorstick/how-did-i-made-a-circle-withing-another-circle-2pe8</link>
      <guid>https://dev.to/vitorstick/how-did-i-made-a-circle-withing-another-circle-2pe8</guid>
      <description>&lt;p&gt;In our recent sprint, &lt;a href="https://www.bigenius-x.com/"&gt;biGENIUS&lt;/a&gt; design team embarked on an exciting journey to enhance user interaction by introducing a sleek stepper view, complete with eye-catching stepper elements. Picture this: a single circle adorned with a numerical indicator and a stylish outer border—cool, right?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MeRdCgNG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o8js2k38t4j542gzvhxf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MeRdCgNG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o8js2k38t4j542gzvhxf.png" alt="Circle Design" width="96" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, the challenge was to bring this vision to life using CSS. Here's the breakdown of my approach:&lt;/p&gt;

&lt;p&gt;Firstly, the color scheme and border of the stepper are intricately tied to its current status—whether it's active or not. While various methods, including different SVGs, crossed my mind, I opted for a more elegant solution: leveraging the power of pure CSS.&lt;/p&gt;

&lt;p&gt;And so, the question arose: how to achieve this visually appealing effect? Let's dive into the process, starting with the creation of the circle containing the numerical identifier—seemingly simple, yet a crucial step in realizing the desired aesthetic.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="stepper-step__number"&amp;gt;1&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.stepper-step__number {
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 24px;
  color: #f3f3f3;
  height: 48px;
  width: 48px;
  min-width: 48px;
  border-radius: 50%;
  background-color: #44a5d8;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The outcome:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0otDygSG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/165q53tlzjj81cpfv7ex.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0otDygSG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/165q53tlzjj81cpfv7ex.png" alt="Number inside a circle" width="70" height="64"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, onto the more challenging aspect—the creation of that elusive white inner circle.&lt;/p&gt;

&lt;p&gt;My initial pondering led me down the path of considering another circle element with a simple white border, nested within the outer circle. However, I realized I was unnecessarily complicating the process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w6wHwNp3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgflip.com/8a3or4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w6wHwNp3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgflip.com/8a3or4.jpg" alt="Over complicated meme" width="667" height="374"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;It dawned on me: why not employ the subtle power of box-shadow to achieve the desired effect? The solution revealed itself through the use of a pseudo-element, a moment of coding clarity that filled me with a sense of pride. This revelation became the driving force behind sharing my experience in this post, a testament to the joy of overcoming coding challenges and discovering elegant solutions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rlaYQG2k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hcve5pjngfn65ysjbxaw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rlaYQG2k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hcve5pjngfn65ysjbxaw.png" alt="the outcome" width="66" height="57"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="stepper-step__number active"&amp;gt;2&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.stepper-step__number.active {
  position: relative;
}

.stepper-step__number.active::after {
  content: '';
  position: absolute;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #fff;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;I am so proud of myself &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GB6aNICR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://c.tenor.com/WckJtOWQl3AAAAAC/tenor.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GB6aNICR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://c.tenor.com/WckJtOWQl3AAAAAC/tenor.gif" alt="Proud of myself gif" width="498" height="379"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If you want to try it, check it out on &lt;a href="https://stackblitz.com/edit/web-platform-4s2peh?file=index.html"&gt;stackblitz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would you have done this differently?&lt;br&gt;
Tell me how on the comments&lt;br&gt;
(probably with tailwind this could be done with some simple things right?)&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>ui</category>
      <category>uidesign</category>
    </item>
    <item>
      <title>Using browser Speech Synthesis capabilities (on an Angular App)</title>
      <dc:creator>Vitor Ferreira</dc:creator>
      <pubDate>Sat, 10 Jun 2023 22:05:49 +0000</pubDate>
      <link>https://dev.to/vitorstick/using-browser-speech-synthesis-capabilities-on-an-angular-app-4pdk</link>
      <guid>https://dev.to/vitorstick/using-browser-speech-synthesis-capabilities-on-an-angular-app-4pdk</guid>
      <description>&lt;p&gt;Guess what? &lt;br&gt;
I've been traveling around Germany! But here's the kicker: instead of diligently learning Deutsch like a responsible adult, I've decided to take a shortcut and create my own app to handle everything for me. Genius or madness? We'll see!&lt;/p&gt;

&lt;p&gt;So, the first obstacle I encountered was the pronunciation of those tongue-twisting German words. Seriously, they sound like a bunch of cats having a karaoke session. But fear not, for my app comes to the rescue! Not only does it provide translations, but it also teaches me how to pronounce those words correctly. I'll be mastering German like a pro in no time, or at least pretending to while giggling at my own attempts..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1wfw2GYb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyck2qc0lk19edl3x8ev.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1wfw2GYb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyck2qc0lk19edl3x8ev.png" alt="Preview of the real app" width="390" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For that, and to have it working offline, I went for the browser capabilities and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API"&gt;Web Speech API&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;I decided to go all-in and use Angular for this app. Why? Well, let's just say I have a soft spot for Angular's sleekness and charm. But hey, don't fret if you're not an Angular enthusiast like me! The beauty of this project is that it's written in good ol' JavaScript, so you can take this linguistic journey with any framework you fancy. It's a choose-your-own-adventure kind of deal!&lt;/p&gt;

&lt;p&gt;First step: just created a service to handle this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export class SpeechService {
  synthesis = window.speechSynthesis;

  start(text: string, rate = 1) {
    const textToSpeech = new SpeechSynthesisUtterance(text);
    textToSpeech.lang = "de-DE";
    textToSpeech.text = text;
    textToSpeech.rate = rate;

    const voice = speechSynthesis.getVoices().filter((voice) =&amp;gt; {
      return voice.name === "Google Deutsch";
    })[0];
    textToSpeech.voice = voice;

    this.synthesis.speak(textToSpeech);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bad part of that from my experience, this only work properly (with a correct accent) in Chrome ...&lt;br&gt;
To see what voices are available, you can check &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/getVoices"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And it's used for this part (I only care about Deutsch):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    const voice = speechSynthesis.getVoices().filter((voice) =&amp;gt; {
      return voice.name === "Google Deutsch";
    })[0];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To use this, I have a simple component that calls this service&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Component({
  selector: 'app-speech',
  standalone: true,
  template: `
  &amp;lt;form class="speech-form" [formGroup]="formGroup"&amp;gt;
    &amp;lt;label style="margin-bottom: 10px"&amp;gt;Please Insert German Word&amp;lt;/label&amp;gt;
    &amp;lt;input formControlName="text" style="margin-bottom: 20px" /&amp;gt;
    &amp;lt;button
      style="margin-bottom: 20px"
      (click)="handleButtonStartClick($event, 1)"
    &amp;gt;
      Say It
    &amp;lt;/button&amp;gt;
    &amp;lt;button (click)="handleButtonStartClick($event, 0.4)"&amp;gt;Say It Slowly&amp;lt;/button&amp;gt;
  &amp;lt;/form&amp;gt;
  `,
  styleUrls: ['./speech.component.css'],
  imports: [ReactiveFormsModule],
})
export class SpeechComponent {
  formGroup = new FormGroup({
    text: new FormControl('', [Validators.required]),
  });

  constructor(private speechService: SpeechService) {}

  handleButtonStartClick(e: Event, speed: number) {
    e.preventDefault();
    if (!!this.formGroup.controls?.text?.value) {
      this.speechService.start(this.formGroup.controls.text.value, speed);
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is a button to allows it to speak, and other that is set to say it slowly (0.4 speed), and believe me, to understand **Deutsch **words, I need it.&lt;/p&gt;

&lt;p&gt;If you want to test it, just for it &lt;a href="https://stackblitz.com/edit/stackblitz-starters-rpxojd?file=src%2Fmain.ts"&gt;here on stackblitz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the real app, it also have SpeechRecognition capabilities, maybe in the future I can share it as well.&lt;/p&gt;

&lt;p&gt;Tell me what you thing, and if you find it interesting fell free to fork it and try it yourself.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>browser</category>
    </item>
    <item>
      <title>Sharing styles between apps inside Nx workspace</title>
      <dc:creator>Vitor Ferreira</dc:creator>
      <pubDate>Tue, 02 Jun 2020 10:11:14 +0000</pubDate>
      <link>https://dev.to/vitorstick/sharing-styles-between-apps-inside-nx-workspace-20i5</link>
      <guid>https://dev.to/vitorstick/sharing-styles-between-apps-inside-nx-workspace-20i5</guid>
      <description>&lt;p&gt;In my current job we have decided to make the change into Nx workspace and with that we decided to create our very own Design System.&lt;/p&gt;

&lt;p&gt;But I didn't want to maintain the same styles in more than one application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a lib for styles
&lt;/h2&gt;

&lt;p&gt;The best solution for my case was to create a &lt;strong&gt;lib&lt;/strong&gt; named &lt;strong&gt;ui&lt;/strong&gt; for the styles:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

nx generate @nrwl/angular:library ui


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then I moved the sass files into the library:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FlwWAxt0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FlwWAxt0.png" title="Files" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem now, is the &lt;em&gt;@import&lt;/em&gt; in all the scss files.&lt;br&gt;
&lt;strong&gt;How to make them recognize the correct files?&lt;/strong&gt;&lt;br&gt;
On &lt;em&gt;angular.json&lt;/em&gt; on every project the path will have to be included.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

"projects": {
    "ds-project": {
        "projectType": "application",
        ...
        "architect": {
            "build": {
                ...
                "stylePreprocessorOptions": {
                    "includePaths": [ "libs/ui/src/lib/styles" ]
                },
                "extractCss": true,
                ...


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now you can import the mixins on the scss files of your project just like if they were still part of the project:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

@import "mixins/list_mixin";
@import "variables";

@include list_layout;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Even the base style, like font-family are importable.&lt;/p&gt;

&lt;p&gt;Inside the &lt;strong&gt;style.scss&lt;/strong&gt; of the project to became the global styles (for this case the module contains the global styles).&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

// styles.scss
/* You can add global styles to this file, and also import other style files */

@import 'module';


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmemegenerator.net%2Fimg%2Finstances%2F58459797%2Fboom-problem-solved.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmemegenerator.net%2Fimg%2Finstances%2F58459797%2Fboom-problem-solved.jpg" title="Problem solved" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This solves easily a problem that could be an issue and I was somehow afraid to tackle, that is having global scss files shared between applications and easily maintainable with only one source of truth (the library).&lt;/p&gt;

&lt;p&gt;If you have any suggestion of how I could do this differently, please share your ideas.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>nx</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Dockerize Angular app and deploy on OpenShift</title>
      <dc:creator>Vitor Ferreira</dc:creator>
      <pubDate>Sun, 03 May 2020 20:57:27 +0000</pubDate>
      <link>https://dev.to/vitorstick/dockerize-angular-app-and-deploy-on-openshift-1km8</link>
      <guid>https://dev.to/vitorstick/dockerize-angular-app-and-deploy-on-openshift-1km8</guid>
      <description>&lt;p&gt;I've been experimenting with several tools and would like to share my latest experience:&lt;br&gt;
Deploy an Angular application created with SSR inside a Nwrl Nx workspace, and then dockerize it and deploy on RedHat OpenShift.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why use Angular with SSR?&lt;/em&gt;&lt;br&gt;
I wanted to try to have a 100% lighthouse audit application, and despite my Angular experience, never worked on an angular project using server side rendering, so, building a personal website, was a good opportunity to experiment and have that 100% on performance.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why chose RedHat OpenShift?&lt;/em&gt;&lt;br&gt;
Simple, I like the red hat that the girls that promote the service use, and I have used AWS and Azure solutions. Also very important, they have a free option.&lt;/p&gt;
&lt;h3&gt;
  
  
  First Step (assuming the application already exist), creating the Dockerfile
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;### STAGE 1: Build ###
FROM node:lts-alpine AS build

#### make the 'app' folder the current working directory
WORKDIR /usr/src/app

#### copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./

#### install angular cli
RUN npm install -g @angular/cli

#### install project dependencies
RUN npm install

#### copy things
COPY . .

#### generate build --prod
RUN npm run build:ssr

### STAGE 2: Run ###
FROM nginxinc/nginx-unprivileged

#### copy nginx conf
COPY ./config/nginx.conf /etc/nginx/conf.d/default.conf

#### copy artifact build from the 'build environment'
COPY --from=build /usr/src/app/dist/vitorspace/browser /usr/share/nginx/html

#### don't know what this is, but seems cool and techy
CMD ["nginx", "-g", "daemon off;"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Remarks:&lt;br&gt;
Had to use &lt;strong&gt;nginxinc/nginx-unprivileged&lt;/strong&gt; due to problems on OpenShift with nginx permissions &lt;em&gt;(thank you random stranger on stackoverflow that suggested it)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;On package.json the script for &lt;strong&gt;build:ssr&lt;/strong&gt; is&lt;br&gt;
&lt;code&gt;"build:ssr": "ng build --prod vitorspace &amp;amp;&amp;amp; ng run vitorspace:server:production"&lt;/code&gt;, remember, this is an angular application with server side rendering.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;nginx.conf&lt;/strong&gt; configuration &lt;em&gt;(I am trying a lighthouse 100% angular application, so I needed that)&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {
    listen 0.0.0.0:8080;
    listen [::]:8080;
    default_type application/octet-stream;

    gzip                    on;
    gzip_comp_level         6;
    gzip_vary               on;
    gzip_min_length         1000;
    gzip_proxied            any;
    gzip_types              text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_buffers            16 8k;
    gunzip on;
    client_max_body_size    256M;

    root /usr/share/nginx/html;

    location / {
        try_files $uri $uri/ /index.html =404;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Second Step - sending docker image to dockerhub
&lt;/h3&gt;

&lt;p&gt;You need a dockerhub account&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Build the image&lt;/em&gt;&lt;br&gt;
&lt;code&gt;docker build -t vitorspace-image .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Run the image to test it&lt;/em&gt;&lt;br&gt;
&lt;code&gt;docker run --name vitorspace-container -d -p 8888:80 vitorspace-image&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;browser it &lt;a href="http://localhost:8888/"&gt;http://localhost:8888/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Commit image&lt;/em&gt;&lt;br&gt;
&lt;code&gt;docker commit 21737e7ab73b vitorstick/vitorspace:v1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Tag image&lt;/em&gt;&lt;br&gt;
&lt;code&gt;docker tag vitorspace-image vitorstick/vitorspace&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Push image&lt;/em&gt;&lt;br&gt;
&lt;code&gt;docker push vitorstick/vitorspace&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Third Step - publishing it on RedHat OpenShift
&lt;/h3&gt;

&lt;p&gt;Assuming you already have a account&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oQdlHMXa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://encrypted-tbn0.gstatic.com/images%3Fq%3Dtbn%253AANd9GcRxF4VCKtsre9L7aUbDPTfNIABdI5QCagOqnVxfNRKZOPmtjUCV%26usqp%3DCAU" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oQdlHMXa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://encrypted-tbn0.gstatic.com/images%3Fq%3Dtbn%253AANd9GcRxF4VCKtsre9L7aUbDPTfNIABdI5QCagOqnVxfNRKZOPmtjUCV%26usqp%3DCAU" alt="alt text" title="Logo OpenShift" width="421" height="120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Create OpenShift Project&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VZhcr8aR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/T34K1zy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VZhcr8aR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/T34K1zy.png" alt="alt text" title="Create Project" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chose &lt;em&gt;Workload&lt;/em&gt; Option and Select &lt;em&gt;Container Image&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kyVX1BG6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/EhaajW1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kyVX1BG6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/EhaajW1.png" alt="alt text" title="Workload options" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don't forget the docker image path, and then just say what will be your application path&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F4RKD3cE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/r6IEWJf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F4RKD3cE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/r6IEWJf.png" alt="alt text" title="Create Project With docker" width="800" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the bottom of the same form, on &lt;em&gt;Advanced Options&lt;/em&gt;, just pick the &lt;em&gt;Create a route to the application&lt;/em&gt; and you will have an url to try and share your application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/2HONNTJbRhzKE/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/2HONNTJbRhzKE/giphy.gif" alt="Alt text of image" width="235" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusions
&lt;/h3&gt;

&lt;p&gt;OpenShift have a lot of options, about pods, configurations, and a lot of other things, but honestly I am a developer, not a devops, and spending a lot of time changing yaml files does not bring me any joy, and that's what I really liked in OpenShift, it's super easy to use (after doing it the first time)&lt;/p&gt;

&lt;p&gt;The main reason for me to create and share this article, was the pain I felt doing some of this things for the first time, and like me, maybe I can help some of you.&lt;/p&gt;

&lt;p&gt;If you have any suggestion about anything, please share.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>docker</category>
      <category>openshift</category>
    </item>
  </channel>
</rss>
